"Taliban interests objectively coincide with ours," Zamir Kabulov, head of the department at the Russian foreign ministry responsible for Afghanistan who is also a Kremlin special representative in the country, told Interfax news agency.
"I have said before that we have communication channels with the Taliban to exchange information," he said.
"Both the Taliban of Afghanistan and the Taliban of Pakistan have said that they don't recognise (IS leader Abu Bakr) Al-Baghdadi as a caliph, that they don't recognise ISIL," he said, using an acronym for the Islamic State group.
Contacted by AFP, foreign ministry spokeswoman Maria Zakharova confirmed Kabulov's remarks were reported correctly. "It has to do with fighting the Islamic State group," she said.
Also Read
Russia considers the Taliban a terrorist group and it is banned in the country, along with the Islamic State group.
The fundamentalist Islamic movement is regularly flagged by officials as a threat, particularly since Taliban-controlled areas in Afghanistan border ex-Soviet Tajikistan, Moscow's impoverished central Asian ally.
Russia's Defence Minister Sergei Shoigu on Wednesday met with Tajik counterpart Sherali Mirzo and said Islamic State presence in Afghanistan consists of yet another threat.
"There are grounds for us to say that ISIL groups have appeared there, and we have additional challenges added to everything that has been there (already)," Shoigu said.