China shrugged off a trade war with the US, but is prepared to retaliate if necessary, a former Chinese ambassador to the US and the spokesman for the country’s parliament, Zhang Yesui, told reporters on Sunday.

“China doesn't want a trade war with the United States,” Zhang said. “But if the US takes actions that hurt Chinese interests, China will not sit idly by and will take necessary measures.”

The statement comes as US President Donald Trump announced plans to impose an import tax of 25 percent on steel and 10 percent on aluminum earlier this week.

On Friday, Trump tweeted that “trade wars are good, and easy to win,” claiming that the US loses billions in disadvantageous deals with “virtually every country it does business with.”

Earlier, China's Ministry of Commerce condemned Trump’s move saying it “seriously damages” the mechanisms of the World Trade Organization (WTO). The ministry also vowed to work with “other affected countries in taking measures to safeguard its own rights and interests,” according to head of the MOC trade remedy and investigation bureau, Wang Hejun, as cited by Xinhua.

Washington’s decision, which is to come into effect next week, has triggered backlash from other American partners, including the EU and Canada. Shortly after Trump’s statement, Canadian Trade Minister Francois-Phillippe Champagne has promised to defend his country’s workers, calling the tariffs “unacceptable.”

On Friday, European Commission President Jean-Claude Juncker said the EU cannot “put our head in the sand” and promised tit-for-tat measures, saying that the bloc may impose tariffs on “Harley-Davidson, on bourbon and on blue jeans – Levis.”