With the US in the process of withdrawing the last of its troops from Afghanistan, it has taken little time for fierce fighting to flare up in several parts of the country, as the Taliban seeks to wrest control from the elected government. Already, it has overrun large swathes of territory and is moving closer to the capital. Talks between the Ashraf Ghani-led government and the Taliban in Doha this month failed to produce a ceasefire agreement, and it is considered highly likely that the country is heading for another civil war.

This time, however, there is the very real potential that the conflict could bear the hallmarks of a proxy war between two of its closest allies, both nuclear-armed: India and Pakistan.

For its part, New Delhi is watching developments nervously, having invested heavily in infrastructure projects in Afghanistan over the past decade, to the tune of around US$3 billion. With reports in recent days that 10,000 Pakistanis have crossed the border to fight alongside the Taliban – and with specific instructions to target Indian-delivered installations, India is rightly concerned that its work could be reduced to rubble, bringing with it the very fragile regional security across the entire region.

India and Afghanistan have historical ties, dating back centuries. The territory covered by modern-day Afghanistan was once part of India’s ancient Maurya Empire, and later, Mughals from the region travelled to India and taking control for centuries. More recently, Indian and Pashtun independence leaders lent support to one another in the 1940s, as India sought to break away from British rule and Pashtuns also worked to gain an autonomous state, while in 1950 the two signed a five-year Treaty of Friendship, signalling the start of official diplomatic ties.

In October 2011 the two countries agreed to a Strategic Partnership Agreement, which solidified their ties. It provided for assistance to help rebuild Afghanistan’s infrastructure and institutions, support education, encourage investment in Afghanistan’s natural resources, and to advocate for a long-term commitment to Afghanistan by the international community.

It is highly likely that India will be playing a larger role in Afghanistan’s internal security.

India has invested heavily in the Central Asian nation. Perhaps the biggest investment is the 218 kilometre Zaranj-Delaram Highway, near the border with Iran. The $150 million road connects to a ring road linking Kandahar in the south, Ghazni and Kabul in the east, Mazar-i-Sharaf in the north and Herat in the west, making it a particularly strategically important route.

In 2015 the Afghan parliament house was inaugurated, another of India’s projects. There is also the 42 megawatt Salma Dam in Herat, which the Taliban recently claimed to have taken under its control. India has also reconstructed a children’s hospital in Kabul, provided Jaipur Foot prosthetics to people who lost limbs in mines, has rebuilt various power infrastructure plants, restored the Stor Palace in Kabul, donated hundreds of buses, utility vehicles, military cars and ambulances, as well as three aircraft, among other projects. In all, India has undertaken more than 400 projects in all of Afghanistan’s 34 provinces – and arguably, has invested more in its Central Asian neighbour than it plugs into its own underdeveloped regions.

The projects underscore just how vital a partner India sees Afghanistan to act as a bulwark against Islamic militancy, and in particular, the country that lies between them, Pakistan.

India’s Prime Minister Narendra Modi and Afghanistan’s President Ashraf Ghani in 2016 at the inauguration of the Afghan-India Friendship Dam (Salma Dam), in Herat (Omar Sobhani/AFP via Getty Images)

Each country has a lot to gain from shoring up its relationship with Afghanistan, and will go about it in different ways: India uses the soft power that results from its projects and investments, while Pakistan harnesses militant groups as proxies, which zigzag across its borders on both sides – including the Taliban.

For its part, Islamabad appears intent on destabilising the relationship of its two neighbours, clearly feeling vulnerable and threatened.

With the Taliban now asserting its might in the vacuum left by US troops, could there be the potential for Afghanistan to become the site of a proxy war played out by its antagonistic neighbours? Even if not, it is highly likely that India will be playing a larger role in the country’s internal security.

In recent weeks, the Taliban has launched multiple offensives against Afghan forces and the government of President Ghani, capturing entire districts and border crossings. However its claims to have taken more than 50 percent of Afghan territory (in some cases up to 85 per cent) are unconfirmed. The Taliban is said be moving closer to the capital and tightening its grip on the north. As a precaution, India has moved all of its Indian staff out of the Kandahar consulate. Kandahar, in the south, was the Taliban’s headquarters when it was in control of the country in the 1990s.

India’s External Affairs Minister S. Jaishankar met with Ghani this month during a conference in Tashkent, along with US officials, to discuss the rapidly unravelling security situation in Afghanistan. And this week, Afghan Army Chief General Wali Mohammad Ahmadzai is expected to visit India. It is this visit that will raise eyebrows: India does not have any of its troops in Afghanistan, maintaining that it doesn’t want to securitise its presence in the country. But Wali is likely to seek assistance during expected talks with India’s National Security Advisor Ajit Doval and his Indian army counterpart General MM Naravane.

According to a report in India’s Financial Express, Ahmadzai is expected to ask for military assistance such as aircraft technicians, along with technical equipment. Already, India has reportedly donated seven helicopters to Kabul and has been delivering military training to Afghan cadets. But as India supports an Afghan-led administration and installations that are owned and controlled domestically, it is highly unlikely that India will be keen to get boots on the ground.

But the screws are tightening, and not just between the Afghan government and the Taliban. The 26-year-old daughter of the Afghan Ambassador in Pakistan was abducted earlier this month and held for several hours in Islamabad. The ambassador and senior diplomats have since been recalled home. The incident also sparked a sharp exchange between officials from India and Pakistan. It’s a sign of a deterioration in ties between the neighbours, and an indication that Pakistan might be agitating to destabilise Afghanistan, in whatever way it can. It is all deeply concerning, as the last thing Kabul needs right now is a cross-border conflict to add into the mix.