London | The Taliban's presence at the massive October jamboree in Beijiing to celebrate the 10th year of China's ambitious trade plan, the Belt and Road Initiative (BRI), is part of Beijing's regional strategy.
This was one of only a handful of foreign visits made by the Taliban since taking power after NATO's withdrawal from Afghanistan in 2021. Interim Afghan minister for commerce Haji Nooruddin Azizi even talked about the Taliban's desire for Afghanistan to join the BRI.
The idea of an Islamist group such as the Taliban allying with the nominally secular and communist China might appear surprising. But this is a logical outcome of China's strategic fears over Islamic militancy at home and abroad.
It is also part of a deepening of ties between China and many Islamic nations in recent years. Historically, Beijing has had no problems working with religious groups or religious-led countries, despite its suspicion of religion at home.
To understand Beijing's motivations for cementing ties with Taliban-led Afghanistan, one only needs to look at Afghanistan's recent history. With the conclusion of the Soviet-Afghan War (1979-1989) and the collapse of the Moscow-installed Najibullah government in 1992, Afghanistan became a hotbed of Islamic radicalism. It became a magnet for militants from all over the world, from Chechen separatists battling Yeltsin's Russia to the Islamist Abu Sayaf, based in the Philippines.
China had been one of the biggest supporters of the Mujaheddin, the Islamic group which ran Afghanistan from 1978 to 1992, providing the group with training and weaponry. This was partly motivated by Beijing's desire to bolster its ties with the United States and to strike a blow against the Soviet Union, its major communist rival.
Beijing is less worried about Russia these days. Not only does it have Russia as an ally, but is the dominant partner in the relationship. But it was the assistance to the Mujaheddin that provided some of the groundwork for the security challenges that China faces today as it created a breeding ground for extremism, close to its borders.
The threat of Islamic militancy from across the Afghan border has posed a very real challenge for Beijing. This was demonstrated by a wave of attacks carried out by Uighur militants in China's western Xinjiang province throughout the 1990s and 2000s, culminating in the 2014 Kunming knife attack, which killed 31 and injured 141 people.
Attacks such as those at Kunming led to China's controversial and repressive policies used against Uighurs in Xinjiang. They also reinforced Beijing's fears of extremism spilling over the borders from Afghanistan.
These would threaten Chinese interests in central Asia and China's western border regions, which have become pivotal for the BRI. The presence of the Taliban at the BRI summit can be seen as an example of how China hopes to create an ally in an attempt to shore up its political and economic interests.
China's ties with Islamic world
The Taliban's presence at the BRI summit also demonstrates China's growing ties with the Islamic world, which has drawn notable attention in recent years.
Beijing mediated between Iran and Saudi Arabia over their long-standing rivalry in the region. It was also involved in the agreement to add several Islamic nations to the BRICS (Brazil, Russia, India, China, South Africa) partnership.
More recently, China's military ties with the region were further underlined by the deployment of Chinese warships as part of a naval exercise with Saudi Arabia.
Muslim nations have been an important source of markets and natural resources for Beijing, with China moving into Middle Eastern markets that had traditionally been dominated by the United States. There has also been a growth in cultural ties, with interest in learning Mandarin Chinese growing throughout the Middle East.
These developments can also be seen as a wider effort by Beijing to present China as a partner to Muslim nations at a time where the grip of the region's traditional power bases appears to have weakened.
Such an effort can be seen in the recent tensions over Gaza, where Beijing has taken a more critical tone over Israel's conduct, which marks a notable change from its more cautious language in the past. This has also been accompanied by a wave of support for Palestine on Chinese social media.
The initial gains from China's efforts to portray itself as a friend to the Islamic world could be seen in how a UK-led statement condemning China's policies in Xinjiang, mainly attracted the support of western nations, but very few Islamic nations. This shows the diplomatic influence that China has built in the Muslim world.
Recent developments have shown that China continues to boost its diplomatic clout in Islamic nations, which could pose a further strategic challenge for western nations.