Now, as the Taliban gains ground and the White House appears to lack a clear Afghan policy, Iran and Russia have boosted support for insurgents and sidelined the United States from regional diplomacy on the war.
Russia on Friday will host high-level talks on Afghanistan with Iranian, Pakistani and Chinese diplomats, the Kremlin said. But the United States, irked by Moscow’s recent outreach to the Taliban, has not confirmed whether it will attend.
Russia has "begun to publicly legitimize the Taliban," and recent Russian and Iranian actions in Afghanistan "are to undermine the United States and NATO," the top commander of U.S. forces in Afghanistan, Army Gen. John Nicholson Jr., said in Senate testimony in February.
The United States has roughly 8,400 troops in Afghanistan, most of whom are part of the NATO mission to assist Afghan forces. The remainder are part of a counterterrorism operation targeting al-Qaeda and a local affiliate of the Islamic State.
Nicholson said Iran and Russia “are communicating about the efforts” to support Taliban insurgents, and that Russia has “become more assertive over the past year.”
“We know there is a dialogue. We know there is a relationship between Iran and Russia” in Afghanistan, he said. And Iran, which shares a long, porous border with Afghanistan, “is directly supporting the Taliban” in western Afghanistan, he said.
While Russia and Shiite Iran appear to be unlikely allies of a hard-line Sunni group such as the Taliban, the two countries have for years played the different sides in the conflict. Both supported the U.S.-backed ouster of the Taliban in 2001, and Iran was the chief benefactor of the anti-Taliban Northern Alliance.
But Iran and Russia eventually soured on the U.S. presence, which they both gradually saw as a threat.
“Iran is worried that with American troops in Afghanistan, the two militaries will end up confronting each other,” said Mohammad Akram Arefi, an Iranian-educated professor of politics at Kateb University in Kabul.
“Iran also wants to revive its power in the region by having influence over Afghanistan. And with America here, they can’t have the type of influence they want,” he said.
Russia, which also sees Afghanistan as part of its sphere of influence in Central Asia, has suggested that the Taliban is an effective bulwark against the rise of the Islamic State. A local branch of the Islamic State has staged deadly attacks but has struggled to gain a foothold beyond its base in eastern Afghanistan.
In a swipe at the legitimacy of the Afghan government, Russia has questioned Afghan security forces’ abilities to target the Islamic State. Still, Iran and Russia have both denied providing the Taliban with weapons or cash.
In an emailed statement this week, the Russian Embassy in Kabul said that the claims were “absurd fabrications” designed to distract from the failure of the U.S. and NATO missions here.
There is “a continuing series of groundless accusations against Russia about alleged support of the Taliban,” the embassy said.
A Taliban spokesman also called the allegations untrue.
“Our contacts with Russia are for political and diplomatic purposes only,” spokesman Zabiullah Mujahid said in a phone interview. He did not say whether Taliban representatives would attend the Moscow talks.
But U.S. and Afghan officials say that the relationship between Russia, Iran and the Taliban goes beyond just diplomacy, and that conflict with the United States elsewhere could prompt Iran and Russia to raise the stakes here.
Afghan lawmakers have launched a probe into the alleged connections, including possible Iranian-Russian coordination to get weapons to insurgents in restive provinces in the south and the west.
Gul Ahmad Azami is an Afghan senator from Farah province, along the Iranian border. He says he was briefed by intelligence officials on reports showing weapons that had been transported into Farah from Iran, in part to ensure the allegiance of local commanders. Officials in Kabul, Helmand, Uruzgan and Herat all made similar claims.
In Helmand province in the south, provincial governor Hayatullah Hayat listed the type of weaponry he says local insurgents receive from Russia with Iran’s help. The list includes land mines, sniper rifles, rocket-propelled grenades and 82mm mortar rounds.
“There is no doubt” the two countries are helping the Taliban, Hayat said. He said he, too, had been briefed by intelligence officials.
He claimed that Iranian advisers have been present on the battlefield, also citing intelligence reports and tribal elders in districts where there is fighting. The police chief in Uruzgan province, Ghulam Farooq Sangari, also told the Voice of America’s Afghan service that Russian advisers were assisting insurgents there, too.
Neither of those claims could be verified, and U.S. military officials have not said whether they know of Iranian and Russian personnel being on the ground. But the assertions indicate the extent to which the debate over Russian and Iranian influence has dominated Afghanistan in recent weeks.
“We are worried that Afghanistan will become another Syria, with world powers confronting each other here,” said Azami, the senator from Farah.
While President Trump has taken a harsh stance on Iran, he has said little about what he envisions for the U.S. role in Afghanistan. In just the past several days, U.S.-Russian relations plummeted after a U.S. missile strike last week on a Syrian military air base. The U.S. administration says the air base was used to launch aircraft that allegedly carried out an April 4 chemical attack that killed dozens of civilians in Syria’s Idlib province.
The state of U.S., Russian and Iranian relations will determine Afghanistan’s stability, officials here say.
“First, people are concerned now about how Americans view Afghanistan, and whether or not they will change their minds about supporting us,” said Mohammad Nateqi, an adviser in the office of Afghan Chief Executive Abdullah Abdullah.
“The relationship between Afghanistan, the United States, and NATO has been very strong,” said Nateqi, who spent decades in Iran. “But if there are bad relations between Iran, the United States and Russia, it will be very dangerous for us.”
Sayed Salahuddin and Walid Sharif contributed to this report.