BEIJING — A dock worker from the eastern port city of Ningbo said he wants China to stand unflinchingly against President Trump’s demands.

A salesman in Beijing hopes his country will keep punching back in the commercial ring — even if it hurts his wallet.

And a coffee shop owner in the Chinese capital said Trump’s tariffs have inspired her to retaliate at the store: She’s swapping U.S. products for Chinese brands.

As the trade war between the world’s two largest economies unfolds on the international stage, analysts say Trump’s brash approach to try to win concessions from Beijing has provoked a public fury that could ultimately thwart his efforts.

In the game of "Trade Wars," perhaps the winning move is not to play. (Daron Taylor, Jhaan Elker/The Washington Post)

Chinese President Xi Jinping’s iron grip on power depends on healthysupport from the nation’s exploding middle class, and now that middle class, angered with Trump’s escalating threats, expects China’s leader to respond with strength. This could make finding a compromise to end the escalation even more difficult.

The American president tossed more fuel on this fire Monday when he said that he intends to trigger levies on additional Chinese imports, seemingly voiding an invitation sent days earlier from Treasury Secretary Steven Mnuchin to rekindle negotiations.

Hours earlier Monday, Trump tweeted: “If countries will not make fair deals with us, they will be ‘Tariffed!’ ” he said on Twitter.

The tough tone effectively ties Xi’s hands, said James Zimmerman, former chairman of the American Chamber of Commerce in China.

“Getting the Chinese to the bargaining table should be all about face-saving — not a chest-thumping exercise,” Zimmerman said. “Xi has no choice but to stand firm and stand tall.”

Until the past few days, when Trump stepped up his tweeting about the negotiations with Beijing, public opinion in China appeared in recent months to be leaning in Trump’s favor. 

Members of the middle class, a force of as many as 400 million people in both blue-collar jobs and professional roles, per government estimates,had been posting criticism of Xi’s leadership online, particularly when it came to his dealings with the United States, said Cheng Li, a contemporary China scholar at the Brookings Institution in Washington. 

The unease came as the country’s stock markets plunged nearly 24 percent from January peaks, and the Chinese currency dropped almost 10 percent against the dollar this year amid the trade tensions. Rising rent, debt and grocery store prices also played into citizens’ concerns. 

Officials have responded to the growing anxiety by blaming Trump and framing Beijing as the adult trying to cool a geopolitical tantrum. China’s retaliatory tariffs on $50 billion in U.S. goods this summer, they said, were measured responses forced by Trump’s swings.

The message appears to have stuck, Li said. 

“The middle class has been critical of the Chinese government, but now that anger is shifting to the United States,” he said. “Chinese media has portrayed Trump as greedy and crazy.”

Trump has threatened to slap duties on practically everything the United States buys from China, a $505 billion order. He wants China to buy more U.S. goods, correcting what he considers an unfair relationship, and to stop stealing intellectual property from American companies. 

But to some Chinese, the U.S. president just looks like a bully.

Chen Weiyong, 64, a retired dock worker from coastal Zhejiang province, said he thinks Trump is taunting China by moving the goal posts. 

“He says one thing one day and does another the next,” he said.

Chen, who spent decades unloading cargo ships at one of the country’s major ports, said he has seen the nation’s commercial power up close. That muscle, he said, could survive without the United States. “The chain will not break,” he said, giving Xi’s defiance a thumbs up.

Li Yunfei, a 35-year-old salesman in Beijing, said he expects the cost of food to soar as the trade war heats up. He is especially worried about soybean oil, which he uses to cook just about everything. 

Still, he would take the financial hit.for his country “The government must fight back,” he said. 

Rill Liu, 40, who runs a cafe in Dongsi, a Beijing neighborhood known for a network of traditional alleyways called hutongs, said Xi’s actions do not concern her, “an ordinary person.”

China, however, is full of ordinary people who hear the United States’ insults. 

After Trump started publicly slamming her country, she said she protested with her shopping cart. “Before we used Apple, but now we’ve changed to Huawei,” she said of the Chinese phone maker. “It makes you emotional like that.”

Yang Liu contributed to this report.