In dealing with the Taliban, an increasingly powerful China may be able to leverage the fact that, unlike Russia or the US, it has never fought them.
When the Taliban were last in power between 1996 and 2001, China had already suspended relations with Afghanistan, having pulled out its diplomats in 1993 following the outbreak of civil war.
"This is us being pragmatic. How you want to rule your country is largely your own business, just don't let that affect China," said Lin Minwang, a South Asia expert with Shanghai's Fudan University.
"When a major Asian power like China shows it recognises Taliban's political legitimacy by meeting them so openly, it is giving the Taliban a big diplomatic win," Lin said.
State media published at least two analytical stories this week highlighting that Afghanistan had been the "graveyard of empires" and cautioning China not to be mired in the "Great Game", reinforcing a message that China harbours neither the intentions of sending troops into Afghanistan nor the illusion that it can fill the power vacuum left by the US.
After their meeting with Wang, the Taliban said they hope China can play a bigger economic role.
"This shows that China might have dangled promises of economic aid and investment to a post-war Afghanistan as a carrot to encourage both sides to stop fighting and reach a political settlement," said Zhang Li, a professor of South Asian studies at Sichuan University.
The risks to China of regional instability were highlighted last month when 13 people, including nine Chinese workers, were killed in Pakistan in a suicide bombing on a bus. China is building massive infrastructure projects in Pakistan under its Belt & Road initiative.
"China's number one priority is for the fighting to stop, as chaos breeds religious extremism and terrorism," Zhang said.