As the United States ends 20 years of military presence in Afghanistan, it says something about the problems it is leaving behind that China has accused it of avoiding responsibility by pulling out troops without ensuring stability. China has blamed a surge of attacks and territorial gains by the Taliban at the expense of the Afghan government on the abrupt withdrawal of American and Nato troops. Beijing has an abiding interest. Afghanistan shares a border with its restive Xinjiang region. It fears that instability will also pose a security threat to its projects under the Belt and Road Initiative infrastructure plan around the region. US President Joe Biden claims American forces have ensured the country can no longer be a base for foreign jihadists. But Foreign Minister Wang Yi has said the US should be responsible and ensure a stable transition. With first the former Soviet Union and now the US withdrawing troops from Afghanistan, Beijing is inclined to favour international or regional cooperation to help stabilise the country and hopefully influence the Taliban. Analysts say the Shanghai Cooperation Organisation (SCO) may play a more active role in that regard. Led by China and Russia, the SCO also includes India, Pakistan and former Soviet republics Kazakhstan, Kyrgyzstan, Uzbekistan and Tajikistan. For Afghanistan, the US withdrawal is the latest chapter in decades of war and turmoil that have given the civilian government little chance to pursue peaceful development. Talks between the Taliban and the Afghan government that began in September have failed to lead to a political settlement or ceasefire. Sadly, with the military mission due to end in September, violence continues to grow. The withdrawal is in return for a commitment by the militants not to allow al-Qaeda or any other extremists to operate in the areas they control. Amid reports that 1,000 mainly US troops may remain to protect diplomatic missions and the airport in Kabul, a Taliban spokesman said they would be treated as “occupiers”. In any event, the US and its allies have a moral responsibility to evacuate Afghan civilians who served them to avoid reprisals. The situation is clearly fluid and fragile. It will require strategic diplomacy from Beijing and its SCO partners to help safeguard security and stability.