A series of photos published last month by Chinese state media of Foreign Minister Wang Yi standing shoulder to shoulder with visiting Taleban official decked out in traditional tunic and turban raised eyebrows on the country's social media.
Since then, China's propaganda machinery has quietly begun preparing its people to accept an increasingly likely scenario that Beijing might have to recognise the Taleban, the hardline Islamist movement that is rapidly gaining territory in Afghanistan, as a legitimate regime.
The commentator, who goes by the pen name Niutanqin, or Zither-Playing Cow, made the remarks on his WeChat channel.
On Friday, the Global Times, a major state-backed tabloid, published an interview with the leader of an Afghan opposition party who said "the transitional government must include the Taleban".
The Taleban's momentum as United States forces withdraw is awkward for China, which has blamed religious extremism as a destabilising force in its western Xinjiang region and has long worried that Taleban-controlled territory would be used to harbour separatist forces.
But China also hews to a policy of non-interference in the internal affairs of other countries.
It has also drastically tightened security in Xinjiang, hardening its borders and putting what United Nations experts and rights groups estimate were at least a million ethnic Uighurs and other Muslims in detention centres that China describes as vocational training facilities to help stamp out Islamist extremism and separatism.
"Isn't this the same Taleban that blew up the Buddhas of Bamiyan in front of world media? Shouldn't we have a bottom line?" a Chinese netizen commented on the Twitter-like Weibo below a news clip showing Mr Wang standing next to a Taleban official.
In dealing with the Taleban, an increasingly powerful China may be able to leverage the fact that, unlike Russia or the US, it has never fought them.
When the Taleban were last in power between 1996-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 Mr Lin Minwang, a South Asia expert with Shanghai's Fudan University.
China says Taleban expected to play ‘important’ Afghan peace role
"When a major Asian power like China shows it recognises Taleban's political legitimacy by meeting them so openly, it is giving the Taleban a big diplomatic win," Mr 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 Mr Wang, the Taleban 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 South Asian studies Professor Zhang Li 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 and Road initiative.
"China's number one priority is for the fighting to stop, as chaos breeds religious extremism and terrorism," Prof Zhang said.