A police officer stands guard in front of a portrait of former Chinese leader Mao Zedong at Tiananmen Square in Beijing on Tuesday. (Giulia Marchi/Bloomberg News)

Chinese leaders are becoming increasingly alarmed about the coincidence of its economic slowdown and the trade war with the United States, with a state mouthpiece on Friday exhorting hundreds of top Communist Party cadres to maintain their “energetic and tenacious spirit of struggle.”

Top officials attended a surprisingly long four-day study session this week, which ended with senior official Wang Huning telling them to get ready to deal with “major risks.”

“We should strengthen our sense of responsibility and purpose, and go all out to fend off and defuse major risks,” Wang told the cadres, according to reports in the state media.

At the start of the study session, President Xi Jinping said that China must be vigilant about “black swans” — improbable events with severe consequences — and “gray rhinos,” or threats that have been ignored.

He warned of “unpredictable international developments and a complicated and sensitive external environment” — an oblique reference to the trade war.

The warnings are a clear signal that China’s leaders are becoming increasingly worried about the cooling economy and the ongoing trade war. The world’s second-largest economy decelerated to its slowest rate of growth since 1990 last year, according to official statistics. The true rate is probably even lower.

In a sharp change from even three months ago, when economic officials were insisting everything was fine, China’s leaders now appear to be “somewhere between alarmed and prudent,” said Andrew Polk of Trivium China, a consulting firm.

“Any outside observer can see that the Chinese economy is facing challenges and that the trade war is taking its toll,” he said. “If they were saying that everything was hunky-dory, then we would be worried. The challenges are intense and this is forcing them to acknowledge them, to draw a fine line between conveying confidence and saying we recognize the risks.”

Meanwhile, Chinese economic czar Liu He is expected to meet with U.S. Trade Representative Robert E. Lighthizer in Washington next week to try to make progress on a deal to resolve the trade war before the March 1 deadline set by President Trump.

The trade war isn’t the cause of China’s slower growth — weakening demand at home and a broader global economic slump are — but it isn’t helping. It is far from clear if an agreement can be reached that would address some of the United States’ concerns about structural problems, like industrial espionage and non-tariff barriers, economists say.

“I think we are prepared for the talks to fail,” said Mei Xinyu, a researcher at the Commerce Ministry’s International Trade and Economic Cooperation Institute. “We are willing to have the talks, but we don’t compromise on matters of principle.”

The official pronouncements are certainly full of fighting spirit.

At the end of this week’s study session, the first in 18 months, Wang told the cadres to be on guard.

“We must boost risk prevention consciousness in preparation for worst-case scenarios: Take the initiative and stay at the ready,” he said, saying China could be “moderately prosperous” this year.

This is a sensitive year for China. The government will mark the 70th anniversary of the founding of the People’s Republic of China in October — Wang said it should be celebrated with “brilliant exploits” — and is also watching for any efforts to mark the 30th anniversary of the Tiananmen Square massacre on June 4.

The People’s Daily, the official newspaper of the Central Committee of the Communist Party, used military metaphors in a column exhorting members to prepare for worst-case scenarios.

“All of us should keep the warrior spirit and stay active and responsible,” it said. “To shoulder political responsibility, we must have an energetic and tenacious spirit of struggle . . . and young cadres must do their job with real swords and spears.”

Mei, of the Commerce Ministry think tank, said that the statements did not suggest alarm but showed that the party was trying to “nip the problems in the bud.”

“The current state of domestic economy is in line with our expectations,” he said. “This study session is not only targeting the economic risks but all kinds of risks.”

Outside analysts were less euphemistic.

“Xi and the leadership are concerned heading into 2019 and are preparing the cadres for lots of struggles,” wrote Bill Bishop, publisher of the influential Sinocism newsletter. “The Year of the Pig looks like it will be an especially nasty, brutish year,” he said, referring to the upcoming lunar year.

Liu Yang, Wang Yuan and Lyric Li contributed to this report.