A resurgent Russia is making new inroads into Afghanistan, not in the way the former USSR did, but by aligning itself with some of the very extremists whose leaders were involved in the defeat of the Soviet Union's decade-long invasion of Afghanistan.

In December 2016, Moscow disclosed its contacts with the Taliban, the group that is intent on toppling the Afghan government. The Russian Foreign Ministry announced that it is sharing intelligence and cooperating with the Taliban to fight Islamic State of Iraq and the Levant group's (ISIL, also known as ISIS) militants in Afghanistan.

Moscow has repeatedly declared its concerns about ISIL militants, in many instances exaggerating their presence and power in Afghanistan.

Meanwhile, Afghan government officials have claimed Russia has been delivering weapons to the Taliban, allegations that have been rejected by Russian officials.

Russia's recent posturing towards Afghanistan has opened a new chapter in what could be termed a new great game in the heart of Asia with multiple players, including Russia, the United States, China, India, Pakistan and others.

Russia's diplomatic offensive coupled with battlefield support to the Taliban has perplexed many about the Russian intention in Afghanistan.

Expansionist ideals

Russia's encroachment into Afghanistan could be part of President Vladimir Putin's expansionist ideals to restore Russia's position as a geopolitical player.

Since coming to power in 1999, Putin has pursued what can be called an interventionist policy through armed conflicts, cyberattacks and propaganda wars.

The second Chechen war in 1999, the conflict in Georgia in 2008, the annexation of Crimea in 2014, the military engagement in Syria in 2015 and the cyber operations on the US in 2016 are prominent examples.

President Putin has successfully exploited these wars to elevate Russia's standing in the international political transactions and consolidate his position in Russia. So the question now is: what does Russia want in Afghanistan?

Russia is most likely following multiple objectives. By aligning itself with the Taliban, it could gain the ability to strengthen its bargaining position in broader dealings with Washington. Insecurity and instability in Afghanistan is on the rise, directly threatening the survival of the US-backed Afghan government and pose a great danger to the US and NATO mission in the country.

In Russian calculation, harassing US/NATO attempts at this precarious situation could be the best time to extract concessions in the form of reducing US pressure on Russia regarding Crimea and easing US sanctions, among others.

Creating legitimacy

It is also likely that Russia is trying to gather additional chips with regards to the future of Afghanistan so that it can then have a front row seat at any regional and global diplomacy/talks on the future of peace and security in Afghanistan. A key motivation in this regard could be Russia's exclusion in most key discussions on Afghanistan in the past.

Russia's attempts could have also been motivated by its concerns over the degrading status of the Kabul government and the lack of clarity of Kabul's western allies towards defending Afghanistan against the growing threat of the Taliban and other terrorist groups.

By providing support to the Taliban, Russia might be hedging itself against the increasing fatigue of the Western countries, preparing to manage the political landscape, and shape the future government if the current government collapses.

By hyping the ISIL threat, Russia not only tries to create legitimacy for their collusion with the Taliban, but they may also want to pave the ground for their augmented military presence and political influence in Central Asia.

Partnering with a dangerous and unpredictable group to pursue a zero-sum game could easily backfire.

As the Central Asian states have been falling under increasing economic influence of China, Russia sees itself losing its hegemonic role.

Increasing its military presence will enhance Russia's policing role in the Central Asian region and expand Central Asia's security dependency on Russia.

There could also be economic motives behind Russia's new game. The Central Asian republics have some of the richest natural gas and oil reserves in the entire region. Leaders of these republics have sought to find new markets, especially in the energy-thirsty South Asia.

This is because if Central Asian states manage to diversify markets for their natural gas, it will further reduce Russia's grip over the region's energy markets (PDF).

OPINION: Afghanistan - Beyond reactive tactics and quick fixes

As Afghanistan is the shortest route for Central Asian natural gas to reach South Asia, alignment with the Taliban would enable Russia to derail attempts to take Central Asian natural gas to South Asia, thus compelling Central Asian states to remain dependent on Russia and China as the main purchasers of Central Asian natural gas.

There is no doubt Russia has legitimate concerns about growing extremism in the region. A remarkable number of ISIL fighters come from the Central Asian countries, which Russia considers its security backyard.

However, supporting one terrorist group to defeat another terrorist group is not a sustainable geopolitical strategy, particularly in the complex landscape of Afghanistan where history has proved many political and military calculations wrong.

Zero-sum game

It is hard to believe the hardcore ideologues could become strategic partners to Russia because of their deep-seated ideological animosity towards the country.

The best approach would be to work with the Afghan government and the regional and international partners to address the growing menace of extremism in the region. Partnering with a dangerous and unpredictable group to pursue a zero-sum game could easily backfire.

Russian support for the Taliban has already helped the militant group make battlefield gains and enhance their legitimacy.

The question is to what extent will Russia support the Taliban and whether it will remain purely tactical support. This will most likely be determined by the state of relations between Putin and the Trump administration and their approach towards fighting terrorism in Afghanistan.

OPINION: The mistakes Trump should not repeat in Afghanistan

If Russia has begun to view the Taliban as an alternative to the Afghan government, then it is on the wrong side of history. Perhaps, in the short-run, Russia might gain in terms of undermining the US and its allies' efforts in Afghanistan or even forcing them to abandon Afghanistan.

Yet in the long-run, Russia's support for the Taliban militants will only unleash a new wave of terrorism in the region, which might see no end and endanger Russia's very security and stability.

Najib Sharifi is a political analyst and a member of Afghanistan Analysis and Awareness, a Kabul-based think-tank.

The views expressed in this article are the authors' own and do not necessarily reflect Al Jazeera's editorial policy.