BEIJING — China’s government has threatened unspecified “necessary countermeasures” if President Trump’s planned tariff hike goes ahead.

The Commerce Ministry said Trump’s announcement is a violation of his agreement with President Xi Jinping in June to revive negotiations aimed at ending their fight over Beijing’s trade surplus and technology ambitions.

The ministry said if the US measures take effect, “China will have to take necessary countermeasures to resolutely defend its core interests.”

The statement issued Friday continued, “All the consequences will be borne by the United States.”

Trump said Thursday he will impose 10 percent tariffs Sept. 1 on the remaining $300 billion in Chinese imports he hasn’t already taxed.

The president earlier imposed 25 percent tariffs on $250 billion in Chinese products. Beijing retaliated by raising import duties on $110 billion of US goods.