China slapped a heavy tariff Monday on U.S. meat, fruits, wine and other products, saying it was a retaliation against President Trump’s import tax on steel and aluminum.

Beijing had warned the U.S. that the tariffs were coming after the Trump administration announced a regime of new tariffs, first on steel and aluminum and then on Chinese high-tech.

China’s Ministry of Commerce said the U.S. had “seriously violated” the principles of non-discrimination under World Trade Organization rules. It said the U.S. also had damaged China’s interests.

“China’s suspension of some of its obligations to the United States is its legitimate right as a member of the World Trade Organization,” the ministry said in a statement.

Beijing, which has insisted it wants to avoid a trade war, also called for more negotiations to resolve disputes between the world’s two largest economies.

The Trump administration had said to expect retaliation, but said that Beijing’s unfair trade practices and theft of intellectual property warranted tariffs and other strict measures.

China’s new tariffs hit 128 U.S. products worth a total of $3 billion in trade, including a 25 percent tax on frozen pork and scrap aluminum, and a 15 percent tax on food commodities such as nuts, fruit and wine.

The retaliation also included a 15 percent increase in duties on rolled steel bars.

The tit-for-tat tariffs smacked of the trade war the U.S. business leaders and investors feared when the Trump administration began enacting get-tough policies on Beijing.

Mr. Trump bucked the critics, arguing that the U.S. was already losing the trade war with a $375 billion trade deficit with China.

“Trade wars are good, and easy to win,” Mr. Trump said recently.

He has pushed China to open its markets and help reduce the trade deficit by $100 billion.

Mr. Trump also has said the tough moves are long overdue against China, which for decades has restricted access to its market and imposed rules that forced technology transfers from U.S. companies doing business in China.

“We are doing things for this country that should have been done for many, many years,” Mr. Trump said March 22 when he signed an order for tariffs and other get-tough measures.

China’s tariffs pale in comparison to the U.S. tariffs, which hit $60 billion in high-tech imports such as telecom and aeronautics.

Still, it could be painful for U.S. farmers who shipped nearly $20 billion in goods to China last year, including $1.1 billion in pork products.