The Taliban's swift return to power after two decades has left Afghanistan's neighbours scrambling to figure out how to adjust to a shifting geopolitical outlook, experts told CNBC

As U.S. military presence wound down, the Taliban made rapid battlefield advances before entering Afghan capital Kabul on Sunday.

Eurasia Group analysts said in a note last week that neighbouring countries are worried about political instability, likely refugee inflows and the prospect of Afghanistan becoming a haven for terrorist activities again.

a group of people standing around a plane: Afghan people sit as they wait to leave the Kabul airport in Kabul on August 16, 2021, after a stunningly swift end to Afghanistan's 20-year war, as thousands of people mobbed the city's airport trying to flee the group's feared hardline brand of Islamist rule.

The Taliban's swift return to power after two decades has left Afghanistan's neighbours scrambling to figure out how to adjust to a shifting geopolitical outlook, experts told CNBC.

President Joe Biden in April ordered the Pentagon to withdraw U.S. troops from Afghanistan by Sept. 11, effectively ending America's longest war. As U.S. military presence wound down, the Taliban made rapid battlefield advances despite being outnumbered by the Afghan military. In recent weeks, the group seized major cities and provincial capitals before entering capital Kabul on Sunday and taking control of the presidential palace.

"Much is in geopolitical flux right now, as Afghanistan's neighbours figure out how to adjust to an emerging Taliban regime," Michael Kugelman, deputy director of the Asia program at the Woodrow Wilson Centre, told CNBC.

Political risk consultancy Eurasia Group said in a note last week that neighbouring countries are worried about political instability, likely refugee inflows and the prospect of Afghanistan again becoming a haven for terrorist activities.

Pakistan

Pakistan held a significant amount of leverage and influence over the Taliban in the past, according to Eurasia Group analysts. It was one of the few countries that recognized the group as a legitimate government when they were last in power.

Pakistan has also long been accused of covertly aiding the Taliban in Afghanistan — a charge that the country denies.

The analysts said, however, Islamabad's influence has waned over the years and Pakistan would likely be on guard over potential violence on its borders. Reports said the Taliban's return in Afghanistan could potentially embolden terror groups in Pakistan, including the Pakistani Taliban, which could affect the country's security.

"More broadly, Pakistan will see the rise of the Taliban as a major setback for its arch-rival India, and thus a positive outcome," the Eurasia Group analysts said.

Pakistan's foreign minister Shah Mahmood Qureshi said on Twitter that the country is working to evacuate diplomats and other personnel from Afghanistan. He also called on the international community to "remain engaged and involved in Afghanistan in a constructive manner."

India

India has had a stable relationship with the civilian Afghan government over the last two decades, providing the latter with development assistance. The shift in power has left New Delhi in a "tough strategic state," Wilson Centre's Kugelman explained.

"Not only has the Taliban, traditionally an anti-India group, seized power, but India's Chinese and Pakistani rivals are now poised to deepen their footprints in Afghanistan," he said.

Eurasia Group analysts pointed out that India has made efforts to engage with the Taliban but has effectively shuttered most of its diplomatic operations in Afghanistan.

"India is especially worried because the last time the Taliban were in power, they sheltered pro-Pakistani militants," the analysts said. New Delhi is concerned that "an emboldened Pakistan will use this as an opportunity to hit India; doing so would raise the potential of a broader India-Pakistan conflict."

India's foreign ministry in a statement said it has advised Indian nationals in Afghanistan to immediately return to India. It also said Tuesday that the ambassador to Kabul and his Indian staff will return to India promptly.

China

While countries like the U.S., U.K. and India have been rushing to evacuate diplomats and citizens from Afghanistan, China decided to keep its embassy in Kabul open. But, it is advising Chinese citizens to stay indoors.

Chinese foreign ministry spokesperson Hua Chunying said Beijing expects a smooth transfer of power and called for crime and terrorism to be contained.

Kugelman said that China will be in a strong position to seek the Taliban's cooperation for its two main interests in Afghanistan: a secure environment for Chinese infrastructure projects, and the isolation of Uyghur militants.

Beijing has been widely accused of detaining more than 1 million Uyghur Muslims in re-education camps in the north-western region of Xinjiang, conducting invasive surveillance on people there and using forced labour. China has repeatedly denied mistreatment of the ethnic minority and has characterized its efforts in Xinjiang as "counterterrorism and de-radicalization."

But some analysts allege the treatment of Muslim minorities in China has strengthened the hand of Uyghur militants, who view China as an oppressor. Militants have sought a haven in the Afghanistan-Pakistan border regions for years, and China has reportedly attempted to negotiate with local parties in both countries to deprive them of that refuge.

Russia

Like China, Russia kept its embassy in Kabul open, but will reportedly move some of its personnel.

Foreign Minister Sergei Lavrov reportedly said Tuesday that Russia is in no hurry to recognize the Taliban as legitimate authorities in Afghanistan and called for the formation of an inclusive government. Both China and Russia still have reasons to worry about the Taliban's return to power in Afghanistan.

Iran

The situation in Afghanistan will demand a high level of attention from Iran, according to Eurasia Group.

"Iran's aim will be to stem the flood of refugees and drugs and prevent harm to the Hazaras in Afghanistan," the analysts said.

The Hazaras, who are mostly Shiite Muslims, are the third-largest ethnic group in mostly Sunni Afghanistan. In the past, the Taliban singled them out for persecution.

The Iranian state "will probably mobilize more armed forces to the border and prepare for a number of contingencies, all of which may distract Tehran from the Arab world in the short term," Eurasia Group analysts added.