image sourceEPAimage captionThe Taliban took complete control of Afghanistan in a blisteringly fast military campaign.

The Taliban's blisteringly fast takeover of Afghanistan has stunned security and diplomacy experts worldwide. Days after the fall of Kabul, nations are hurriedly evacuating their diplomats and citizens, leaving behind two decades of work and investments.

The Taliban's rout is likely to cause a significant shift in the geopolitics of South Asia, and it could be particularly testing for India, given India's historically tense relations and border disputes with Pakistan and China – the two countries expected to play a crucial role in Afghanistan's future.

Pakistan shares a porous border with Afghanistan and has long been an active player in its northern neighbour's affairs. Now China is showing an interest in playing a bigger role in Afghanistan. China's foreign minister Wang Yi's met with senior Taliban leaders last month.

The potential geopolitical realignments could "change things upside down", said Gautam Mukhopadhaya, India's former ambassador to Afghanistan and Syria.

Afghanistan was a loose alliance between the democratic government in Kabul, the West and other democracies like India. But the world is likely to see Pakistan, Russia, Iran and China coming together to play the next chapter of the Great Game.

  • A flight out of Kabul on a fateful day
  • Will the Taliban take Afghanistan back to the past?
  • Ten days that shook Afghanistan

Some in India see this as a loss for Delhi and a big win for Pakistan. But former Indian diplomat Jitendra Nath Misra said that was too simplistic a view, because the Pahstun-led Taliban has never recognised the border between Afghanistan and Pakistan, creating discomfort for Islamabad.

"Pakistan would want to get the Taliban to accept the border and this will be a top priority," he said.

It's also true that the Taliban's rule in Afghanistan gives Pakistan strategic depth against India. Pakistan has gotten what it always wanted, said Michael Kugelman, deputy director of the Wilson Center think-tank in Washington – a government in Afghanistan that it can easily influence.

"Pakistani officials may show this off as India's loss, but then there are bigger strategic goals for Pakistan," Mr Kugelman said. "It really sees itself as the biggest regional winner at the moment."

image sourceEPAimage captionSeveral countries have sent special aircraft to evacuate its citizens from Afghanistan

Experts say Pakistan was not happy with the growing ties between the US and India, or former Afghan president Ashraf Ghani's lukewarm ties with Islamabad. Its struggling economy also made Islamabad feel vulnerable.

And Islamabad has reasons to believe that it's the winner because its "all-weather" friendship with China will be useful in Afghanistan. Moreover, Beijing is not shy of showing its might anymore. "China can and will play the game now according to its own rules," Mr Kugelman said.

China has economic interests in Afghanistan, which can help fulfil China's ever-growing need for minerals, but more importantly it can pressure the Taliban to ban the East Turkestan Islamic Movement (ETIM), which it blames for unrest in its Muslim-dominated Xinjian province, to operate on Afghan soil.

Russia and Iran also seem to be on the same trajectory – neither has evacuated its embassy, and both nations' diplomats are still working in Kabul.

image sourceEPAimage captionThe Taliban have promised that there will not be any retributions, but experts say its too early to trust these promises

So, what can India do now? The country was never as big a player in Afghanistan as Pakistan, the US or Russia. But Delhi has always been involved in promoting security and cultural ties. Thousands of Afghans are in India for education, work or medical treatment.

According to Amlendu Misra, a professor of politics at Lancaster University and the author of a book on Afghanistan, there are no good options for Delhi. "There are bad and then there are worse options," he said.

The biggest challenge India will face is whether to recognise the Taliban government or not. The decision will get tough, especially if Moscow and Beijing decide to acknowledge the Taliban government in some form. Experts say Islamabad is likely to recognise the Taliban government, as it did in 1999.

India's best option at the moment seems to be keep a channel of communication open with the Taliban. But it will be an uneasy relationship, considering the history between the Taliban and Delhi. The Taliban gave a safe passage to the hijackers of an Indian Airlines plane in 1999 – an incident that remains etched in the collective memory of Indians. And Delhi has always kept close ties with the Northern Alliance – a group of Afghan warlords that fought the Taliban between 1996 and 1999.

image sourceReutersimage captionTaliban fighters have been patrolling streets in all major cities

With the Taliban in the heart of Kabul, India may now wish to put the past to one side in order to safeguard its own interests, and to ensure the region remains stable. There are concerns that militant groups like the Jaish-e-Mohammad Lashkar-e-Taiba will be galvanised by the Taliban's success and plan and execute attacks against India.

And India may need all of its diplomatic power to ensure that the contested region of Kashmir doesn't become the next rallying point for the mujahideen. It's a tightrope India will have to walk.

While experts say India needs to keep talking to the Taliban, it will have to decide how much it may want to get involved in any anti-Taliban groupings. The West is likely to form a united front to keep pressure on the Taliban. British PM Boris Johnson has already called for a joint response to the Taliban government.

Then there are other possibilities, like the Northern Alliance regrouping later, or Afghanistan becoming another place for a fight for supremacy between the US-led West and a joint group of China, Russia and Pakistan.

So there are no easy options for India, but its decisions will have consequences on regional peace and global geopolitics.