Moscow’s links with Taliban date back for some time. The Russians’ first in-person contact with the Taliban was established in 1995 when a Russian helicopter transporting weapons was forced to land in Kandahar by the Taliban and seven Russian citizens were arrested. It was none other than Zamir Kabulov who traveled to Kandahar and met the Taliban’s reclusive leader, Mullah Mohammed Omar. After the negotiations failed, the seven arrested Russian pilots escaped by helicopter to UAE and also took with them three Taliban.

A more recent meeting, per an account by the Sunday Times, was held between the former leader of the Taliban and Russian President Vladimir Putin in September 2015 for the purpose of collaboration. Putin met Mullah Akhtar Mansour in an unpublicized meeting at a military base in Tajikistan. The meeting was reportedly conducted to discuss mutual cooperation in the fight against Islamic State (ISIS). The Taliban denied that any such meeting took place. After Mansour was killed by a U.S. drone strike in Pakistan’s Balochistan province, the Russians continued their contacts with the Taliban under Mullah Haibatullah Akhundzada, the current leader of Taliban.

Russian policymakers have extended their hand to the Taliban for the following four strategic reasons.

First, by maintaining ties with the Taliban, Russia reminds the West not to ignore Moscow’s interests in discussions of the Afghanistan agenda at regional and international platforms. In January 2016, a Quadrilateral Coordination Group (QCG) was formed for to advance the peace process, with the participation of the United States, China, Pakistan, and Afghanistan. The four states conducted meetings on talks with the Taliban; Russia felt marginalized, thought the QCG’s efforts ultimately failed.

Moscow instead organized a trilateral meeting on Afghanistan attended by Russia, China, and Pakistan, later supported by Iran. By this, Moscow alerted the West to the fact that Russia can play a role in Afghanistan, including by forming another regional coalition. Russian Foreign Minister Sergey Lavrov, in his visit to Kabul last week, announced an international meeting on a peace process with the participation of Russia, Afghanistan, Pakistan, China, Iran, and India to be held in February this year in Moscow. Neither the United States nor any NATO member state has been invited yet.

Second, by supporting the Taliban, Russian policymakers intend to strengthen barriers to U.S. and NATO interests in the region. Since 2001, more than 2,300 American soldiers have died in Afghanistan in the fight against the Taliban and al-Qaeda. Moscow also intends to expand its influence beyond Central Asia — covering Afghanistan and Pakistan — apart from being involved in Middle East.

In order to strengthen its links with the Taliban, Moscow is also getting close to Pakistan. In September 2016, 70 Russians and 130 Pakistani special forces conducted their first-ever joint military exercise in the north of Pakistan. Pakistan has been supporting the Taliban since its establishment and now it will enjoy the partnership of Moscow for this cause.

Pakistan has been also criticized, particularly by Afghanistan and India but also by the international community more broadly, for its support for militant groups. But now, Russia’s ties with the Taliban may lessen Islamabad’s burden of international condemnation.

Third, Russia feels a threat from the Islamic State (ISIS) in Afghanistan and in the Middle East. In 2014, ISIS expanded to Afghanistan, which the Kremlin fears may lead to its expansion, particularly to the north of Afghanistan into Central Asia and Russia. The Taliban and ISIS have been fighting each other since ISIS entered Afghanistan, so Russia has extended its hand to the Taliban. Last December, Russian Foreign Ministry spokeswoman Maria Zakharova made it public that Moscow is engaged in intelligence sharing with the Taliban in its fight against the Islamic State. Russia’s regional collaboration with Iran and Turkey on Syria, which have brought it some success, suggest it may look to pursue a similar approach in Afghanistan by bringing Iran, China, and Pakistan together.

Fourth, Afghan opium is another headache for Moscow. Afghanistan supplies 90 percent of the world’s illicit opiates, which are mostly being produced in territory controlled by the Taliban. The opiate producers target Russia as one of the largest markets in the world; each year illicit drug use kills 70,000 people in Russia. Policymakers in Moscow thus believe that in the fight against narcotics, the Taliban can be a better partner than Afghanistan’s National Unity Government.

Afghan opium has been an issue not only for Russia, but for the entire region and Europe for more than a decade. Therefore, Russia can’t justify its ties with the Taliban solely on the elimination of opium. It is clear that the Taliban will not stop supporting opium production, given that opium generates the bulk of the group’s income (it earns about $400 million annually from opium production). Russian meetings with the Taliban since 2007 have not helped in opium reduction in the least. Only a stable Afghanistan and a powerful Afghan government can address the challenge of narcotics in Afghanistan, not the Taliban.

Even if a primary goal behind Russia’s ties with Taliban is sincerely fighting the Islamic State, Moscow is making a strategic mistake, since the Taliban cannot eliminate ISIS by themselves. In fact, a majority of the ISIS fighters in Afghanistan used to be Taliban in the past; more Russian-backed Taliban might join the Islamic State later. Hence, Russian support to the Taliban will only further deteriorate the security in Afghanistan.

The proper approach is to cooperate with Kabul, since the National Unity Government (NUG) backed by the international community is the sole side fighting ISIS with tangible results in Afghanistan. The NUG has been able to eliminate ISIS from its birthplace in Afghanistan in Farah and Helmand and later in Zabul and Ghazni provinces. Hafez Sayeed, the ISIS leader in Afghanistan, and hundreds of fighters were killed and Afghan forces have squeezed fighters dramatically. ISIS fighters once had established a stronghold in the east of the country, which faced intense military assault by Afghan forces. Backed by the United States, Afghan forces killed 300 ISIS fighters in Nangarhar in July 2016.

Russia’s support to the Taliban will have numerous implications for the future of Afghanistan. It will weaken the central government in Kabul, which will result in the situation that now has befallen Syria coming to Afghanistan. In Syria, Russia is supporting the government of President Bashar al-Assad, but in Afghanistan, by supporting the Taliban, Moscow will limit the success of the legitimate government in Kabul backed by the international community.

Hashim Wahdatyar is a political analyst based in Washington D.C. He is a former spokesperson and programme officer for the United Nations (UNODC) in Afghanistan. He is also a fellow at Asia Society. He tweets @hashimwahdat. The views expressed in this article are the author’s own.