CHINA’S leader, Xi Jinping, welcomed Donald Trump on the American president’s first visit to Beijing like a Chinese emperor receiving a barbarian potentate, with a mixture of flattery and disdain. The government closed to the public the 9,000-room Forbidden City—the vermilion-walled former imperial palace at the heart of Beijing—so the visitor could have his own tour and dinner there. The courtiers of the Communist Party have lost little of the ancient art of feigned deference.

The Chinese also bore gifts: trade deals worth over $200bn, covering everything from jet engines and car parts to shale gas. Most of the pledges were memoranda of understanding: expressions of intent, not enforceable contracts. Many concerned things the Chinese would have done anyway. Still, Mr Trump seemed pleased, as he also was by Mr Xi’s (reiterated) pledge to enforce UN resolutions on North Korea.

The question is how long the summit’s bonhomie will last. Under Mr Xi, China has become more open in its challenge to American influence in Asia. The official media have turned more sharply critical of America’s political system. The problem has hardly reached the embassy-burning stage (angry crowds last surrounded the American embassy in Beijing in 1999, after NATO’s mistaken bombing of the Chinese embassy in Belgrade). But there is a whiff of anti-Americanism in the air.

Mr Trump claims that he and Mr Xi are close. The same can hardly be said of public attitudes towards each other’s countries. A study in 2016 by Zhang Kun and Zhang Mingxin of Huazhong University of Science and Technology found that America was far down the list of countries about which the Chinese express favourable opinions—below Germany, Britain, France, Canada, Australia and Russia. Things may have changed since then because views of Mr Trump are warmer in China than in most places. But opinions of America itself are unlikely to have improved much. A survey in the same year by the Pew Research Centre in Washington also found that only half of Chinese respondents were favourable to America—much less than the global median “favourability rating” for the United States of 64% then.

American opinions of China are even cooler. Pew’s poll in 2017 found more Americans expressed negative views about China than positive. Such attitudes might not affect policy but they could make public dissatisfaction easy to ignite.

Anecdotal evidence suggests there is plenty of flammable material. One of the most popular questions on Zhihu, a Chinese question-and-answer site, is “Is America preparing to dismantle China?” (the most popular answer, though, is that if China were to collapse, America would not be the main reason). It has been viewed 3m times since the start of 2016. The phrase “American air is so sweet” has become a term of online abuse. It stems from a comment by a Chinese graduate of an American university who said that “when I took my first breath of American air, it was so sweet and fresh…I felt free.” The remark produced a torrent of criticism in China; she apologised and closed her online account. The term is now used as sarcastic criticism of all things American.

For many years, despite ups and downs in policy, China’s rulers stuck to a strategic view that the United States was essential to their country’s modernisation. China, they argued, needed American technology to upgrade its industries and American markets for its exports. That view has become far less strongly held as China’s economy shifts away from exports and towards home-grown innovation. In the past year, moreover, it has been overlain by a competing idea: that China’s global ambitions require a dose of anti-Americanism.

Bucking the norm

In a speech last month at a five-yearly party congress, Mr Xi made those ambitions even more apparent. He talked of moving China “closer to centre stage” and of the country’s “all-round efforts” to pursue “great-power diplomacy with Chinese characteristics”. It is not clear what these characteristics are, but it is a safe bet that they do not involve accepting global norms established by America.

The United States has long proclaimed itself “the last, best hope of Earth” (to quote Lincoln). Now Chinese media are advancing similar claims about China’s system. In mid-October Xinhua, the main state-run news agency, made the case explicitly. In an article called “Enlightened Chinese democracy puts the West in the shade”, it said the Western kind was “doddering”. It argued that the Chinese system “leads to social unity” rather than the divisions which it said were an “unavoidable consequence” of Western democracy. The commentary forbore to name names, but state media often talk of Mr Trump’s America as a prime example of what Xinhua referred to as “the endless political backbiting, bickering and policy reversals which are the hallmarks of liberal democracy”.

Xinhua’s description of democracy’s self-destructive tendencies echoes that of a book published in 1991 called “America Against America” by a professor at Fudan University, Wang Huning. But there are three important differences between China’s interaction with America today and the way it was then. One is that Mr Wang has just been elevated to the party’s most powerful body, the Politburo Standing Committee, where he is likely to be in charge of propaganda (that is, projecting the party’s image at home and the country’s abroad). Having in such a position an America-sceptic who actually studied there is unprecedented.

Next, the government has started to export what it calls “the China model”. Deng Xiaoping once said China was not a model for anyone. At last month’s party gathering, Mr Xi talked about China “blazing a new trail for other developing countries” and offering “Chinese wisdom and a Chinese approach to solving problems” (his “Belt and Road Initiative” offers lots of cash, too). Orville Schell of the Asia Society in New York says this seems to set up a clash not just of civilisations and values, but of political and economic systems.

Third, the anti-American strain now seems to run from the top of the Chinese state (Messrs Xi and Wang) to the bottom (Xinhua and internet trolls). That suggests such sentiment is gaining strength. Mr Xi may still prefer to exercise caution in his country’s rivalry with America. But he does not seem to have moderated his global ambitions because of Mr Trump. And it will take more than a dinner in the Forbidden City to wish those ambitions away.