KABUL, Afghanistan — During one of the most violent stretches of fighting in northern Afghanistan, as the Taliban scored victories that had eluded them since the beginning of the conflict, the top American commander went public with a suspicion that had nagged for years: Russia was aiding the insurgents.
In diplomatic circles in Kabul around the time of that accusation, in 2017, there were murmurs that the Russian assistance had included night-vision goggles and armor-piercing ammunition.
But Gen. John W. Nicholson, the commander, offered no definitive evidence, and that spoke to how confusing the battlefield had become as three longtime adversaries — the Taliban, Russia and Iran — agreed on their common interest in seeing the Americans leave Afghanistan. In the maze of corruption, cash and foreign hands in Afghanistan, it was no easy task to pin down who was doing what.
“We’ve had weapons brought to this headquarters and given to us by Afghan leaders and said, ‘This was given by the Russians to the Taliban,’” General Nicholson said a year later. “We know that the Russians are involved.”
The recent revelation of an American intelligence assessment that Russia had provided the Taliban with bounties to attack U.S. and coalition troops stunned political leaders in Washington and added a potent dose of Cold War-style skulduggery to deliberations over Afghanistan’s future. Both Russia and the Taliban have rejected the assertion.
But while that would be a notable escalation of Russian interference in Afghanistan, it was clear to many officials that Russia had been working to hedge its bets with the Taliban for years. The Russians saw the Afghan government as entirely controlled by the United States, and at worst so fragile that it would struggle to survive the U.S. withdrawal.
In interviews, Afghan and American officials and foreign diplomats with years of experience in Kabul say that what began as a diplomatic channel between Russia and the Taliban just under a decade agohas more recently blossomed into a mutually beneficial alliance that has allowed the Kremlin to reassert its influence in the region.
The shift coincided with increasing hostility between the United States and Russia over Syria’s civil war and other conflicts, analysts say, as well as Russia’s frustration with rising instability in Afghanistan and the slow pace of the U.S. pullout.
Now, the United States is conducting the troop withdrawal it agreed to with the Taliban even without a final peace deal between the insurgents and the Afghan government which the Americans have supported for years. But Russia’s covert efforts, officials and analysts say, are aimed at harassing and embarrassing the United States as the troops leave rather than profoundly changing the course of the conflict.
“It was in modest quantities; it was not designed to be a game-changer on the battlefield,” General Nicholson, who has since retired from the military, told the House Foreign Relations Committee on Thursday about Russian arms and aid to the Taliban. “For example, the Taliban wanted surface-to-air missiles, the Russians didn’t give it to them. So I always concluded that their support to the Taliban was calibrated in some sense.”
Some pointed out the considerably more extensive American efforts to support the mujahedeen insurgency against the Soviet Union in the 1980s.
“We did the same,” said Marc Polymeropoulos, a former C.I.A. field officer in Afghanistan who retired last year as the agency’s acting chief of operations in Europe and Eurasia. “We turned the heat up as the Russians were leaving Afghanistan.”
“Putin,” he said, “is a student of history.”
As things began turning on the battlefield in recent years, officials described increasing suspicions of a greater Russian role in helping the Taliban. But they often struggled to pin down specifics, other than occasional influxes of new weapons and munitions that could have had several sources. In addition to Pakistan’s well-established support to the Taliban, Iran was taking a greater hand in helping the insurgents, and often using similar channels as the Russians, Afghan intelligence officials say.
The dots began connecting more clearly during a stretch of alarming violence in northern Afghanistan, when the Taliban twice overran Kunduz city, a provincial capital, in 2015 and 2016, sending the U.S. military scrambling.
As Afghan intelligence narrowed in on the ambitious regional Taliban commander behind those assaults, they tracked his travel back and forth across the nearby border with Tajikistan, a Russian intelligence stronghold, according to current and former senior Afghan security officials. Kunduz is also the base of operations for two Afghan businessmen who American intelligence officials say acted as middlemen in the bounty scheme between Russian intelligence officers and Taliban fighters.
U.S. officials say they confronted Russia about its aid to the Taliban on several occasions, but their public claims lacked detail, and it never amounted to a major issue. Russian officials said they received no documented evidence.
Three decades after the Soviet military withdrawal from Afghanistan, Russia’s cultural, economic and personal ties in the country remain deep. When Russia has looked to exert influence, whether benign or otherwise, it has had a host of friends to call on: Soviet-trained generals who led the Afghan forces for years on American pay; businessmen who bragged of friendship with President Vladimir V. Putin of Russia; politicians who kept homes in Moscow even as they grew rich on American contracts.
For much of the first decade of the war, the United States did not really have to worry about the deep Russian reach into Afghan society, as Mr. Putin’s government was aligned with the American mission of defeating Al Qaeda and Islamist groups that Moscow also saw as a threat — including the Taliban.
Diplomatic cables released by WikiLeaks show genuine attempts by both sides to coordinate efforts in Afghanistan. Russian officials spoke of a “collective fist” in the fight against terrorism, and urged unity “with one voice — the American voice.”
But as the war in Afghanistan dragged on, and the two powers took opposing sides in the crises in Syria and Ukraine, the Russians increasingly saw the U.S. mission as failed, and the American presence in the region as a threat.
American intelligence officials now date Russia’s discreet outreach to the Taliban as beginning about eight years ago — around the time that Mr. Putin, after a four-year hiatus as prime minister, reassumed the presidency with a more confrontational posture with the West.
The mistrust soon became intense enough that Russian officials accused the United States of playing a hand in the rise of an Islamic State chapter in Afghanistan around 2015, with many of its earliest fighters being extremist militants from Central Asia who yearned to bring a holy war against Russia.
At a meeting of the Russian Security Council in 2013, Mr. Putin said his country could no longer stand by in the face of failures by the United States and its partners.
“We need a clear action strategy, which will take into account different possible developments,” Mr. Putin said at the meeting. “The task is to reliably protect the interests of Russia under any circumstances.”
Leading the portfolio on the diplomatic front was Zamir Kabulov, a veteran of the Soviet war in Afghanistan and reportedly a former Russian intelligence operative.
Mr. Kabulov began publicly criticizing the United States for weaknesses in the Afghan government and for failing to rein in Islamist militancy there — and increasingly describing the Afghan Taliban as a national entity that posed no threat beyond the country’s borders and could be worked with.
Reports increased about Taliban figures making trips to Russia. And just as the United States and Taliban were finalizing details of the American withdrawal, Russia brought the same Taliban leaders into Moscow meetings with a large number of Afghan political figures for discussions over the political future of the country.
As the United States has drawn down its military presence, it has increasingly relied on Afghan partners for intelligence and counterintelligence. What Afghan security officials were seeing in recent years, particularly in the north, was a deeply messy reality.
Around the time they began focusing more on Russian activities, the Afghans also unraveled an Iranian scheme of distributing arms to discontented warlords and militia commanders — the weapons were Russian, and the route was through Tajikistan, officials said. The Iranian scheme was short-lived, one senior Afghan official said, after Iran realized the weapons it was providing were turning up in the saturated black market.
The Russians often used the hundreds of millions of dollars in fuel imports for NATO and Afghan forces as a way to inject cash into Afghanistan to ensure influence and keep intelligence assets on their side. One former senior Afghan official said that instead of direct cash transfers, the Russians would mostly arrange for the convoys of oil tankers snaking into Afghanistan to be topped with extra fuel that would be cashed for circulation inside the country.
Though the countries of Central Asia gained their independence after the Soviet collapse, Russia has never let go of its foothold in the region. In one cable, a Russian diplomat described the borders of countries like Tajikistan, where the Russian Air Force still has about 7,000 troops, as “an extension of its own border.”
When the Taliban were in power in Afghanistan in 1990s, Tajikistan was a hub for the resistance commanders who received aid from Russia and Iran. In the 20 years since the U.S. invasion, the country has become a center of criminal traffic and vice, a kind of adult playground for many of the Afghan elite who frequently travel back and forth to Tajikistan and often have family there.
In that mix of spies, money and mafia, the Taliban, too, found a foothold. The insurgents made a point of taking and maintaining control of some of the border crossings from Kunduz Province into Tajikistan. From the south of the country all the way to the north, they had border access to evade military pressure, maintain ties with friendly foreigners and keep a channel for the opium trade that partly finances the insurgency.
Several Afghan officials, including Asadullah Omarkhel, who was the governor of Kunduz at the time, said they shared with the Americans intelligence that Mullah Abdul Salam, the Taliban commander who led the assaults on Kunduz, repeatedly crossed into Tajikistan for what they suspected were discussions with Russian agents. A Tajik news outlet reported meetings between Russian officials and Taliban commanders at a Russian air base in Tajikistan as early as 2015. And it was these border crossings that the Taliban used to bring weapons in, officials say.
Mr. Omarkhel said Americans initially were not confident about claims of Taliban ties to Russia, but then they started striking the Taliban bases along the border, including a strike that killed Mullah Salam.
At Thursday’s congressional hearing, General Nicholson repeated his accusation of Russia arming the Taliban, noting that even though the aid was not extensive, it still had effect.
“In the northern part of Afghanistan, in particular in Kunduz, the Russian assistance did help the Taliban inflict higher casualties on the Afghan security forces and more hardship on the Afghan people,” he said.
Najim Rahim, Eric Schmitt and Taimoor Shah contributed reporting.