Chinese President Xi Jinping attends the World Economic Forum in Davos, Switzerland. (Ruben Sprich/Reuters)

China is gearing up for the possibility of a trade war with the incoming Trump administration and has fired a small warning shot, according to the American business community here as well as the Chinese themselves.

At the World Economic Forum in Davos this week, Chinese President Xi Jinping warned that a trade war would benefit nobody, but at home, his government is quietly getting ready for one.

“China is threatening to, and is preparing to, take steps in retaliation,” said Lester Ross, chairman of the policy committee of the American Chamber of Commerce in China (AmCham China) at a news conference Wednesday to launch the group’s annual survey of business conditions.

Publicly, China’s Ministry of Commerce has responded calmly to Trump’s repeated criticism of the two countries’ relationship, with its spokesman Shen Danyang insisting last month that the transfer of power in Washington won’t change ties, which he described as “interwoven,” “interdependent” and “mutually beneficial.”

But behind the scenes, the ministry is not standing still.

Ross cited a decision announced last week to raise duties on distillers dried grains — a byproduct of ethanol production used as animal feed — from the United States.

The Ministry of Commerce raised an anti-dumping tax on imports from the United States from the 33.8 percent announced provisionally in September to between 42.2 and 53.7 percent. An anti- ­subsidy tax on those imports was raised about one percentage point, to a maximum of 12 percent.

Other anti-dumping duties are on the verge of being institutionalized, Ross said.

Mei Xinyun, a researcher with the Ministry of Commerce, said China had refrained from engaging in a war of words with Trump over trade but said it won’t be bullied. He drew attention to the recent anti-dumping measures.

“This is a way of saying, ‘We don’t want to get into a row with you, but we will take action,’ ” he said. “Trump will need to pay the price should he want more trade friction.”

AmCham China’s Ross said some of the anti-dumping measures might have happened anyway but added: “It is not as though China is without an arsenal of actions that it could take in response to actions by the United States.”

For its part, the Obama administration has frequently imposed anti-dumping penalties on China, including very stiff duties on certain types of steel, although nothing that amounts to a trade war.

On Jan. 12, the administration announced it had brought a new challenge against China at the World Trade Organization for “unfair” aluminum subsidies, the 16th such challenge it has brought against China.

In fact, Trump will be wading into what is already a trade relationship bubbling with discontent.

Four out of five U.S. companies in China surveyed by AmCham say they feel less welcome here than before, citing unclear laws with inconsistent enforcement as well as rising protectionism and restrictions on foreign investment in many sectors of the economy.

AmCham China’s chairman ,William Zarit, said the chamber had recommended to both major U.S. presidential nominees that they take a “stronger stance” in trade and investment negotiations with China, given what he described as an increasingly unfair playing field for U.S. companies.

“We’d recommend the U.S. to be more aggressive in talks,” he said.

But Zarit also warned Trump not to start a counterproductive trade war and said any move to declare China a currency manipulator would not be grounded in current realities — these days, China is actually trying to prevent its currency from depreciating rather than forcing it lower to stimulate exports.

He welcomed Xi’s pledge to keep China’s doors open to foreign trade but said those words had not been backed up by actions in recent years.

“The United States and other non-Chinese markets have been quite open to Chinese trade and investment — more open than China has been to their trade and investment,” he said.

Zarit said a delegation of AmCham China members would travel to Washington next month in the hope of meeting officials of the new administration to convey their message. That visit is in addition to the group’s annual “door-knock” mission to Washington in May, and a recognition that this is a “special" year, he said.

Luna Lin contributed to this report.