Kabul: Taliban would not engage in a dialogue with Afghan President Ashraf Ghani's government as long as the Pakistani military and intelligence continue to give sanctuary to terrorists, said a prominent Afghan expert.

In an interview with German's DW, Ahmed Rashid, a journalist and best-selling foreign policy author of several books about Afghanistan, said that the chaotic situation in Afghanistan "can suck in the neighbouring countries."

"If that happens, that will be the end of Afghanistan," he said.

"Why should they when their leaders and their families are safe? If Pakistan wants to show its sincerity, it needs to immediately force the Taliban leaders to either compromise or leave their sanctuaries in Quetta or in Peshawar," Rashid said.

The violence has escalated in Afghanistan as foreign forces are withdrawing from the war-torn country.

There is a fear of full-blown civil war as the Taliban stepped forward and took control of several districts in the country's north, while Afghan forces are retaliating and launching a counter-offensive against the Taliban.

Hundreds of Afghan security personnel recently retreated across the Tajik-Afghan border in response to Taliban advances in northern Afghanistan.

Islamabad has been accused of aiding the Taliban and using them as proxies for its own benefit. However, it continues to deny its connection to the terrorist group despite mounting evidence.

Recently, Pakistan's interior minister Sheikh Rashid Ahmed has admitted that families of Afghan Taliban reside in his country, including in the capital city of Islamabad.

Ahmed also said the Taliban receive medical treatment in Pakistani hospitals.

This was in contrast to what Pakistan claims. Last month, Pakistani Foreign Minister Shah Mahmood Qureshi had denied the presence of Taliban sanctuaries in Pakistan.

He had said that the terrorist group's leaders "are in Afghanistan." Moreover, he denied the existence of such institutions in Pakistan and said he "has been hearing of these terms for now decades."

Afghan officials have long maintained that Pakistan provides shelter and military support to the Taliban.

But as the US is ending its two-decade war in Afghanistan, Pakistan's alleged interference in Afghanistan has become a major topic of discussion in the Afghan media, According to DW.

"You must be aware that we are under attack from Pakistan. It is not the Taliban that we are fighting: We are dealing with Pakistan's proxy war," Abdul Sattar Hussaini, an Afghan lawmaker, said on a recent TV talk show.

"The Taliban do not have any plan for Afghanistan, and we are not ready to accept Pakistan's plan," he said.