In early December, China’s ministry of foreign affairs jumped the Great Fire Wall used by Beijing to block access to many foreign websites, and joined Twitter to communicate directly with the outside world.

Its tweets so far have ranged from calling the US a “SUPER LIAR” and upbraiding foreign journalists, to lauding China’s victories: “China’s vast land of 9.6 million km² is free from war, fear, refugees and displacement. People of 56 ethnic groups live happy life, BEST human rights achievement!”

"When presented with lies versus truth, every journalist is facing a test of conscience. Are you being truly objective and just or are you being selective and partial? What does your decision reveal?" TRUTH AIN'T LIE! https://t.co/nsK1INnVPL pic.twitter.com/wd4tJjMsGE — Ministry of Foreign Affairs 外交部发言人办公室 (@MFA__China) December 10, 2019

China’s new, defensive, somewhat Trumpian, social media strategy betrays Beijing’s anxiety over the country’s image as it enters 2020.

“2019 has been a very, very bad year for China’s international reputation across a whole range of fronts – Hong Kong, Xinjiang, foreign interference, espionage, technology, strategic competition,” said Adam Ni, co-editor of China Neican, a a newsletter on Chinese policy.

China under the leadership of Xi Jinping will enter 2020 on the back foot, after a year of converging crises. More than seven months of protests on its doorstep in Hong Kong have captured global attention and mobilised citizens to push back against Beijing’s influence over the city.

A year-and-a-half-long trade war with the US has escalated into near full-on rivalry with Washington. Meanwhile, China’s ties with Canada, Australia, and the UK have all come under strain in the past year as concerns about Beijing as a national security threat grow.

Anti-government protesters in Kong Kong throwing molotov cocktails towards police vehicles during clashes in November. Photograph: Tyrone Siu/Reuters

More recently, two major leaks of classified government documents detailing China’s programme of mass detention of Muslim minorities in Xinjiang have emboldened critics, witnesses and other countries to speak out, and raised questions about possible dissent within government ranks.

At home, the government faces a slowing Chinese economy, which is growing at its most sluggish pace in 30 years, raising fears about unemployment. Chinese residents have been hit by rising consumer prices, highlighted by the fact that the cost of pork, the country’s staple meat, has skyrocketed, prompting the government to release strategic pork reserves.

A recent high-level economic planning meeting, attended by Xi and other top officials, named “stability” as one of the key priorities for the government next year.

“We are at a critical period,” an official summary of the conference said, acknowledging “downward economic pressure” and “intertwined structural, institutional and cyclical problems”. It said: “We need to be well prepared with contingency plans.”

But rather than weakening the ruling Chinese Communist party’s hold, observers say chaos gives it pretext to exert yet more control. “The party draws a lot of strength from weakness. It’s able to justify crackdowns, party loyalty campaigns,” said Samantha Hoffman, who researches Chinese security at the Australian Strategic Policy Institute.

The government has in the last few months released new guidelines for patriotic education, the training of party members, morality guidelines for citizens, and new restrictions on content. Secondary and primary schools have been ordered to cull their libraries of “illegal” or “improper” books – leading to one incident of a book burning at a county library.

External pressures also give Beijing the ability to deflect. The Chinese economy was facing headwinds before the trade war, yet officials can now blame some of those problems on Washington.

“Similarly, even though the Hong Kong protests are fuelled by local concerns, the official media on the mainland has been working overtime to make them seem the result of foreign influence, which plays into the CCP narrative that the west is determined to do what it can to interfere with China’s rise,” said Jeffrey Wasserstrom, who teaches Chinese history at the University of California at Irvine.

“There is a lot of nationalist sentiment that plays into the CCP’s [Chinese communist party] hands, which is actually partly strengthened by the problems Xi Jinping and company face,” he said.

Facility believed to be a re-education camp where mostly Muslim ethnic minorities are detained. Photograph: Greg Baker/AFP via Getty Images

Some of the pressure China faces in this next year is also self-inflicted. Xi has staked out “three tough battles” that his party must win by the end of next year in order to be on track to achieve an even larger goal, the “great rejuvenation of the Chinese nation” by 2049, the 100-year anniversary of the country’s founding. Xi has set 2021, which is also the centenary of the founding of the Chinese communist party, as the deadline for his government to have created a “moderately prosperous society”.

“Looking ahead to that, I’m sure CCP leaders would prefer both their country and their party to be in a much stronger position. Right now, the CCP is playing defence on many fronts,” said Maura Cunningham, a historian who specialises in modern China.

Beijing has decided that one of those battle lines in 2020 will be western-facing social media. In addition the ministry of foreign affairs, Chinese ambassadors to the UK, Austria, Saudi Arabia, Zimbabwe, and Nepal have also joined Twitter in the last year.

They are hitting back against criticism and presenting China’s positions. Some, like the former ambassador to Pakistan, Zhao Lijian, who is now at the ministry of foreign affairs have become especially outspoken.

Zhao recently launched a diatribe against journalists who did not report on a documentary on Xinjiang, released by state media.

Observers say the strategy is unlikely to be that effective. “The CCP has traditionally been completely incapable of handling criticism. Again and again, party organs respond clumsily,” said Cunningham.

“They might think that tweeting in English will help correct global misperceptions about the People’s Republic of China and the Chinese Communist party, but instead they either look divorced from reality – or like trolls,” she said.