When NATO withdraws from Afghanistan later this year, India and Russia may well fill the security vacuum to prevent the Taliban from resurging, aligning them both against neighboring Pakistan.

India has reportedly agreed to pay Russia to deliver small arms, such as light artillery and mortars, to Afghanistan. The transfer could eventually include heavy artillery, tanks and possibly attack helicopters.

India’s foreign minister, Salman Khurshid, said during a visit to Afghanistan in February, “We are giving them helicopters and we will be supplying them very soon.”

A Foreign Ministry official told the Reuters news agency that India won’t commit troops on the ground nor give Afghanistan all the military equipment it has asked for — “for all sorts of reasons, including the lack of surplus stocks.”

“Involving a third party is the next best option,” the source said, referring to Russia. Indian officials apparently visited Moscow in February to firm up the deal.

Having contributed close to $2 billion in aid over the past decade, India is the fifth largest donor nation to Afghanistan. But it doesn’t share a border with the country, hampering its aid efforts. It cannot rely on its rival Pakistan to reach Afghanistan. That country is more inclined to strike deals with Islamist insurgents in its unruly frontier region whom it sees as a wedge against India. India’s expanded support for the civilian government in Kabul could therefore set the stage for a proxy war between the two once the Americans and their allies have pulled out next year.

India has depended on Iran to facilitate its trade with Afghanistan but that country’s port facilities at Chabahar may not be able support larger volumes of shipments. India did finance the construction of a road from Chabahar to Delaram, a town in the west of Afghanistan that is situated on its Ring Road, to transport goods into the country.

Iran’s troubled relations with the West are also an impediment if India wants to simultaneously expand its partnership with the United States in order to balance against a rising China. Hence the deal with Russia. Although, given the deterioration in American-Russian relations since the latter invaded and annexed Ukraine’s Crimea in March, it might not have chosen a far more respectable partner.

India, Iran and Russia previously worked together to support the Northern Alliance, made up mostly of ethnic Tajiks, against the Taliban before the Americans invaded in 2001.

During the Afghan civil war, Pakistan’s intelligence services backed the Taliban which they saw as the most viable political movement among the country’s majority Pashtun population and therefore the best ally to give them “strategic depth” in Afghanistan in the event of an Indian attack. If India doubled down on its commitment to the government in Kabul, Pakistan might face the prospect of a war on two fronts and is likely to respond by ramping up support for whichever faction opposes it.