China is ready to retaliate after the United States revived plans to hit it with new tariffs.

"We want to reiterate that we don't want a trade war, but we aren't afraid of fighting one," Chinese Foreign Ministry spokeswoman Hua Chunying said at a briefing on Wednesday.

Trade tensions between Washington and Beijing appeared to have eased in recent weeks after both sides said they had agreed to put plans for tariffs on hold while they tried to make progress in negotiations.

But the Trump administration called off that truce Tuesday with the surprise announcement that it was moving ahead with tariffs on about $50 billion worth of Chinese goods as well as measures to restrict Chinese investment in the United States.

"If the US insists on acting arbitrarily and recklessly, China will take firm and powerful measures to safeguard its own legitimate rights," Hua said.

Analysis: Trump's on-again, off-again strategy on China may backfire

Analysts said the US move may be an attempt to gain leverage ahead of Commerce Secretary Wilbur Ross's visit to China later this week for talks. But it left Beijing unimpressed.

"In international relations, an about-face or constant change of positions is bound to damage or squander a country's credibility," Hua said. She echoed an earlier statement by the Chinese Commerce Ministry that the White House announcement went against the recent "consensus" reached by the two sides.

The surprise US move has raised questions about whether the talks with Ross will go ahead.

The Wall Street Journal reported Wednesday that they could be canceled if the two sides are unable to agree in advance on the issues to be discussed during Ross' visit.

Hua referred questions about Ross' visit to the Commerce Ministry, which is due to hold its regular weekly briefing Thursday morning in Beijing.

China said last month that it would respond to the US tariff threat with similar measures on $50 billion of American exports, including aircraft, automobiles and soybeans.

The White House said Tuesday that it would provide details of the Chinese products affected by the new tariffs on June 15 and that they will take effect "shortly thereafter."

-- Steven Jiang contributed to this report.