China weighs risk and reward in a Taliban-led Afghanistan
China abhors a power vacuum, especially on its borders, and maintaining stability after decades of war in its western neighbour will be Beijing's paramount consideration.
But if stability requires a Taliban-dominated government, an equal concern would be the support such an administration might provide to Muslim separatists in China's Xinjiang region.
Communist Party leaders in Beijing and the fundamentalist Taliban have little ideological common ground, but analysts say shared pragmatism could see mutual self-interest trump sensitive differences.
"For China, the risk does not come from who holds the power in Afghanistan, but from the risk of persistent instability," Fan Hongda, a Middle East specialist at the Shanghai International Studies University, told AFP.
But the frontier is a big concern because it runs alongside Xinjiang, and Beijing fears its neighbour being used as a staging ground for Uyghur separatists from the sensitive region.
"They have never been sure how willing or able the Taliban really are to enforce agreements on issues such as harbouring Uyghur militants."
For Beijing, a stable and cooperative administration in Kabul would pave the way to an expansion of its Belt and Road Initiative into Afghanistan and through the Central Asian republics.
Taliban spokesman Suhail Shaheen told AFP that the insurgents want to "have good relations with all countries of the world."
"If any country wants to explore our mines, they are welcome to," he said. "We will provide a good opportunity for investment."
It doesn't hurt if they invest
Beijing has already opened dialogue, having hosted a Taliban delegation in 2019, and this week Foreign Minister Wang Yi hosted talks on regional security in central Asia.
Back-door links with the Taliban through Pakistan have stretched back longer and "allowed China to avoid any major terrorist attack on its projects in Afghanistan", according to Thierry Kellner, a political science professor at the Universite Libre de Bruxelles.
These projects include the giant Aynak copper mine near Kabul, for which a Chinese company secured a potentially lucrative concession in 2007 but where work has long been stalled due to conflict.
Since the Aghan government has failed to provide security in places where Beijing wanted to make big investments, "it now thinks it doesn't hurt if they invest in the Taliban and give them a chance," said political scientist Atta Noori in Kabul.
Beijing has made political capital out of the American troop withdrawal and warned that Afghanistan could again become "the region's powder keg and a haven for terrorism."
Wang has also stressed the need to "bring the Taliban back into the normal political game" in conversations with his Afghan and Pakistani counterparts.
"China never wants to have boots on the ground but loves to get involved economically, making use of the vast mineral resources in Afghanistan," added Noori.
Of course we will talk
This could extend to an accord on Xinjiang, where rights groups say a million Uyghurs and other mostly-Muslim minorities have been placed in re-education camps, alongside allegations of forced labour and sterilisation.
China has responded defiantly to a chorus of international condemnation over the camps, which it says are training centres necessary for stamping out Islamic extremism.
As Beijing has steadily poured cash into its close ally Pakistan, Prime Minister Imran Khan has stayed conspicuously silent on Xinjiang, which also borders his country.
By signing deals with the Taliban, Beijing hopes they will also remain publicly neutral on the Uyghur issue.
In an interview with the Wall Street Journal, the Taliban's Shaheen said that "if there are some problems with the Muslims (in China), of course we will talk with the Chinese government."
More pressing problems will keep any influx of Chinese capital on hold for now, said Ayesha Siddiqa, an expert on the Pakistani military and its economic investments.
"Is Afghanistan ready for investment? The answer is no," she told AFP.