Mr Xi’s cause has been helped by the chaotic response to coronavirus in the US and parts of Europe. US president Donald Trump and his secretary of state, Mike Pompeo, have also aggressively pushed an unproven theory that the virus might have leaked accidentally from a government lab in Wuhan, alienating American allies and raising nationalist ire in China.

Even public anger that erupted over government attempts to silence Li Wenliang, a doctor who alerted friends about the virus and later died of it, was largely directed at local officials rather than Mr Xi or other senior leaders in Beijing. Li has been posthumously lionised by the central government as a national martyr in the battle against the “devil virus”.

“At first people were angry with the government for its handling of the epidemic,” says Deng Yuwen, a former editor at the Central Party School’s influential Study Times newspaper. “Then the virus spread across the world and death tolls were much higher elsewhere. People changed their minds partly because of what Xi did right, but more because of other countries’ failures.”