China on Thursday vowed to retaliate against any new tariffs in the trade war with the United States — even as it said it would be willing to meet the White House “halfway” on trade issues.

Beijing’s Finance Ministry said in a statement that Washington’s latest tariffs, set to start Sept. 1, violated an agreement between President Donald Trump and Chinese President Xi Jinping to resolve their disputes through negotiations.

China’s Foreign Ministry spokeswoman, Hua Chunying, said, “We hope the US will meet China halfway, and implement the consensus of the two heads of the two countries in Osaka.”

Xi’s government would likely stall on more talks, believing Trump is eager to end the trade war as soon as possible with the stock market swinging wildly in recent days, Wu Xinbo, director of the Center for American Studies at Fudan University in Shanghai, told The South China Morning Post.

But Trump said later Thursday that any agreement must meet US demands, suggesting the possibility of a protracted stalemate.

“China, frankly, would love to make a deal, and it’s got to be a deal on proper terms. It’s got to be a deal, frankly, on our terms. Otherwise, what’s the purpose?” Trump said in an interview on New Hampshire radio station WGIR.

He amplified those comments in New Hampshire later in the day — insisting again that China is desperate for a deal

“We’re having very good discussions with China. They very much want to make a deal. We’ll see what happens,” he told reporters.

Trump has vowed to impose 10% penalties on an additional $300 billion in goods — a move that would cover nearly all of China’s exports to the US — beginning Sept. 1, but on Tuesday said he would hold off on adding penalties on about 60% of those goods until Dec. 15.

Trump dismissed investors’ worries Thursday.

“We had a couple of bad days but … we’re going to have some very good days because we had to take on China,” he told WGIR.

He tweeted later, “The United States is now, by far, the Biggest, Strongest and Most Powerful Economy in the World, it is not even close! As others falter, we will only get stronger . . . Business Optimism is at an All Time High!”

With wires