China was once considered an indifferent observer of the carnage in neighboring Afghanistan, where one of the most destructive modern wars killed and maimed millions for more than three decades.
But, after an apparent policy shift, Beijing is now seen as capable of restoring lasting peace in Afghanistan by leaning on key regional ally Pakistan to abandon its support for the Taliban and other Afghan Islamist rebels now fighting against Kabul.
A senior Afghan official, who requested anonymity because he is not authorized to speak on the issue, said China's interest in Afghan stability is prompted by the security threats emanating from Pakistan and Afghanistan.
The official said Beijing knows that Uyghur separatists from the East Turkestan Islamic Movement (ETIM) are hiding and plotting attacks in their Xinjiang homeland in northwest China from their hideouts in Pakistan's restive western tribal region and adjacent southeast Afghan provinces.
"Never discount the factor of Chinese security concern. They're quite concerned and rightly so," the official told RFE/RL's Gandhara website. "Just look at the presence of hundreds of ETIM militants in our region and in Syria, Iraq."
Hundreds have been killed in Xinjiang in an unprecedented rise in attacks by alleged Uyghur Islamists during the past two years. "The New York Times" recently reported the Afghan intelligence service is cooperating closely with Beijing and has shared its investigations of dozens of Uyghur militants it captured in Afghanistan in recent years. Most were trained at militant camps in Pakistan.
The Afghan official said that, in recent years, Kabul has worked hard to secure a proactive Chinese role in Afghan stability.
Observers say Kabul pushed for securing Chinese assistance after Afghanistan and its Western allies failed to get Pakistan's help in recent years to ensure a settlement with the Taliban as international troops end their combat mission in the country.
Following his inauguration in September, Afghan President Ashraf Ghani paid his first state visit to China, where Chinese Prime Minister Li Keqiang called on Afghanistan's neighbors to respect its "sovereignty, independence and territorial integrity, not interfere with its internal affairs and support Afghanistan's efforts to realize security and stability."
The Afghan official said Kabul is ready for a new beginning with Pakistan. Ghani will visit Pakistan this week following recent visits by Pakistan's powerful army chief General Raheel Sharif and top spy General Rizwan Akhtar.
"China, as a trusted friend to both, can offer invaluable help," he said. "And let's remember that China will be doing this mainly out of self-interest, which is a pretty good incentive."
Reuters reported on November 11 that Beijing has already proposed hosting a "peace and reconciliation forum" at which representatives from the Taliban, Afghanistan and Pakistan could gather to hold peace negotiations.
A Pakistani lawmaker, who requested anonymity because of the sensitivity of his views, said that, in closed-door deliberations between Beijing and Islamabad, Chinese officials have been explicit about what they expect from Pakistan.
"If no progress is seen on reconciliation between the Afghan Taliban and Kabul in a year's time, you might see Beijing telling Islamabad to choose between backing the Afghan insurgents or its decades-old friendship with China," he said.
But Barnett Rubin, director of the New York–based Center on International Cooperation think tank, said such a dramatic rupture is unlikely. He said Beijing can push Islamabad to bring the Afghan Taliban to the negotiating table with Kabul.
"There is a relationship of trust between the governments of Pakistan and China, and even more important between the militaries and security services of those two countries," he said. "Pakistan cannot afford anything that alienates China, so if China has shown a high level of public commitment to support the Afghan government, the Pakistan government cannot try to secretly undermine it without fear of badly damaging its relationship with its most important and faithful ally."
Zalmay Khalilzad, the former U.S. ambassador and special presidential envoy to Afghanistan, agreed. He told Radio Free Afghanistan that China can help in improving the fraught relations between Pakistan and Afghanistan. "This [Chinese role] will complement the U.S. pressure on Pakistan and convince Islamabad not to sabotage the peace process in Afghanistan and instead convince the Taliban to join this process," he said.
Beijing is already flexing its economic muscle to back diplomacy; its status as one of the biggest foreign investors in Pakistan and Afghanistan gives it unprecedented leverage. It recently announced more than $500 million in grants to Kabul. In recent years, China has invested more than $4 billion in developing Afghan oil and copper reserves.
Last week, China promised Pakistan investments worth $42 billion in return for help in fighting Uyghur militants. During the past two months, China has pledged to invest an additional $90 billion in infrastructure development projects in its neighboring Asian countries.
"It also seems China is keenly interested in establishing a zone of prosperity around it. And this is where Afghanistan and Pakistan can both benefit from China's engagement," the Afghan official said.