MOSCOW - A Kremlin official said Wednesday that Russia was exchanging information with the Taliban, the Islamist insurgency that the United States has been fighting in Afghanistan since 2001, as a bulwark against the spread of the Islamic State militant group in that country.

Zamir Kabulov, a Foreign Ministry department head and President Vladimir Putin's special representative for Afghanistan, told the Interfax news agency that "the Taliban interest objectively coincides with ours" in the fight against the Islamic State, which has captured broad swaths of territory in Syria and Iraq.

"I have already said earlier that we and the Taliban have channels for exchanging information," Kabulov added, in remarks reported by Interfax and confirmed to the Washington Post by a ministry spokesman.

A limited partnership with the Taliban, which announced last week that it would send "special forces" to fight Islamic State, is a striking, and somewhat confusing, twist in Russia's war on terror. Although Russia plunged enthusiastically into its airstrike campaign against IS in Syria in September (critics say Russia is mainly there to prop up President Bashar al-Assad), Moscow has opposed the Taliban for more than a decade as a potential vehicle for terror and instability in the former Soviet Union.

Along with the Islamic State, the Taliban is on a Russian government list of terrorist organizations. Similar to the Islamic State, the Taliban is known for staging brutal public executions and imposing an extreme interpretation of Islamic law on the territories it has captured.

The grueling 14-year-old war in Afghanistan sparked by the Sept. 11, 2001, attacks has killed more than 3,400 troops from a U.S.-led NATO coalition and left the Taliban diminished but not defeated. In September, the Taliban captured the northern Afghan city of Kunduz for 15 days, the first major city captured by the Taliban since the U.S.-led invasion.

Although there are signs that the popularity of the Islamic State is growing in Afghanistan, including the mysterious Caliphate Radio station that broadcasts Islamic State propaganda every morning, the Taliban remains a far more potent force there.

After the capture of Kunduz, Russia reinforced its 201st Motorized Rifle Division military base in Tajikistan, a former Soviet republic that borders Afghanistan, sending attack helicopters in what was widely seen as a response to the resurgence of the Taliban in a city less than five miles from the border with Tajikistan.

In the same interview Wednesday, Kabulov said Russia would be "ready to supply weapons but will do it with due prudence and mostly on a commercial basis" to Afghanistan. Those weapons would probably be used against the Taliban, which this week launched an offensive aimed at a strategic Helmand province district.