President Donald Trump said on Tuesday the U.S. was close to a trade deal with China and that he would meet his Chinese counterpart Xi Jinping before the end of the year if an agreement is struck.

"He asked for a meeting, and I'll end up having a meeting before the end of the year most likely, if we make a deal. If we don't make a deal, I'm not going to have a meeting," Trump told CNBC in an interview referring to China's Xi.

"We're getting very close to a deal. We're getting along with China very well," Trump said.

President Donald Trump attends a bilateral meeting with China's President Xi Jinping during the G20 leaders summit in Osaka, Japan. REUTERS/Kevin Lamarque

Treasury Secretary Scott Bessent said last week he believed the U.S. had the "makings of a deal" with China after officials from the two countries met in Stockholm in a bid to resolve economic disputes aimed at extending their truce on a trade war by three months.

China is facing an August 12 deadline to reach a durable tariff agreement with the U.S. administration, after Beijing and Washington reached preliminary deals in May and June to end escalating tit-for-tat tariffs and a cut-off of rare earth minerals.

Without a deal, global supply chains could face renewed turmoil from U.S. duties snapping back to triple-digit levels that would amount to a bilateral trade embargo.

Speaking to CNBC, Trump also said his administration would soon impose tariffs on U.S. imports of pharmaceuticals, semiconductors and chips, which is expected to impact China.