Last month, Afghan security forces left their posts outside Russia’s fortified embassy compound in Kabul. They were replaced by Taliban fighters, who promised “nobody would touch a hair on the heads” of Moscow’s diplomats, and said they were just there to keep the peace. “They’ve made a good impression on us,” ambassador Dmitry Zhirnov told reporters. “They are adequate men.”
At the same time, on the other side of the city, American, British, German and French diplomats were shuttering their consulates and relocating to the airport, desperately processing paperwork for the thousands of people fleeing the advance of those apparently adequate men. Now, as the dust settles on the West’s hasty retreat from its decades-long mission in Central Asia, it is the Russians – and the Chinese – who have stayed behind. With the nation-building over, they are eyeing a role in the re-building.

The fact that Moscow and Beijing have been forging bilateral relations with the Taliban, Afghanistan’s de facto government, is no great secret. Just weeks ago, the Kremlin hosted a delegation from the Islamist militant group for talks, despite it technically being banned as a terrorist organisation in Russia. China, meanwhile, has announced it is ready for “friendly and cooperative” relations with the radical new administration, hoping to move forward with plans to mine the country’s untapped mineral wealth.

While NATO now finds itself in the awkward position of negotiating with people it was shooting at not long ago, Dominic Raab, the British Foreign Secretary, has admitted that it will have to seek diplomatic muscle from elsewhere to sway the Taliban. “We’re going to have to bring in countries with a potentially moderating influence like Russia and China, however uncomfortable that is,” he told The Sunday Telegraph.

Neither nation has missed the opportunity to paint Washington’s climb-down as a catastrophe for what they see as American hegemony and Western imperialism. Chinese state television went for the unsubtle approach, broadcasting the film A Dog’s Way Home as US troops lifted off from Kabul. Russian Foreign Minister Sergey Lavrov was more cordial, welcoming Joe Biden’s pledge last week that Afghanistan is the “end of an era” for foreign intervention. “We have long been calling for lessons to be learned from the situations our Western colleagues have gotten themselves into in recent decades,” he said.

But Moscow has simultaneously struck a more downbeat note in recent weeks. “People assume we’re gloating over the events of the past few days, but we have no such feeling,” Lavrov said, insisting his country is “very worried” about the potential fall-out. Kremlin spokesman Dmitry Peskov revealed on Thursday that Vladimir Putin is still now getting constant briefings on Afghanistan, receiving updates on the situation more than once a day. Afghanistan is firmly in Russia’s back yard, and Moscow is committed to the defence of neighbouring former Soviet Republics, which have faced destabilisation in recent weeks.

Uzbekistan, for example, saw hundreds of light aircraft flying across its borders illegally as the US-backed government’s top brass fled Kabul. Its air defence units even shot down one plane, forcing its crew to eject and parachute to the ground in their effort to claim asylum. Meanwhile, Tajikistan saw Kabul’s troops crossing into the country to seek respite from fierce fighting with the Taliban, before militants finally took control of the border posts.

In the wake of the fall of Kabul, Putin spoke with his Chinese counterpart, Xi Jinping, with the pair “emphasising the need to establish peace in the country as soon as possible and preventing the spread of instability to the wider region.” The two leaders pledged to work together to keep the peace, evidently wary of the security threat the Taliban poses, even while preparing to do deals with them.

Since then, Russia has staged massive joint military drills with Uzbekistan and Tajikistan – the two countries on the front line – which saw its units blow up tonnes of explosives as part of a show of force meant to deter any would-be incursions. Just two decades ago, Islamist warlords based in Afghanistan sent fighters across the border to fight in Tajikistan’s bloody civil war, which killed an estimated 100,000 people. The message is clear: we’ll talk with the Taliban, but we won’t stand for destabilisation.

These are conflicts that had laid dormant for years, with the NATO mission in Afghanistan broadly containing the unrest within its boundaries. Now, with Western troops gone, Central Asia is once again becoming somewhere regional powers need to worry about. Terrorism, trafficking in opium and political extremism are all issues that China and Russia now need to take action on, whereas before they could leave it to the West. Most of the time, Moscow and Beijing understood that was a bargain worth making, even if it meant US troops in the region.

On Wednesday, American officials announced they would help the Tajik government build hardened border facilities in an effort to help limit the spread of the chaos their mission in Afghanistan left behind. The idea of refugees crossing the vast frontier into the former Soviet Union is clearly causing concern both in the Kremlin and further afield. “There may be millions of refugees,” Putin has claimed, “they’ll get on anything – a car or a donkey – and try to flee across the steppe.” According to him, “we don’t want fighters disguised as refugees turning up in Russia.”

Likewise, China had, despite its protestations about American imperialism, understood the value of US troops in war-torn Afghanistan. It had even seen the area as one where it could build more positive ties with Washington, using “areas of shared concern” to strengthen rock-bottom relations. Analyst Yun Sun wrote recently that the withdrawal “is certainly not considered good news in China.” According to Yun, Beijing believes “the US’s strategic retrenchment from Afghanistan will free up its capability to compete more vigorously with China.”

Not to mention that Russia and China are, compared to NATO, poorly suited to working together to keep the peace. Despite warm words between their governments, the level of actual coordination and on-the-ground partnership is very limited, as is intelligence sharing. Both are essential if the two nations want to fill the role the West did when it comes to counter-extremism and anti-terror operations.

While the EU and other reluctant partners in Biden’s withdrawal have argued the unilateral pull-out is an opportunity for Russia and China, the reality is that it’s an opportunity neither would have wanted in the first place. Now, Putin and Xi are finding themselves playing an unprecedented role in the future of the troubled nation. Not because they chose to, but because they’re the only ones left.