President Donald Trump said Wednesday that his administration's tariffs on Chinese imports could stay in place indefinitely until Beijing complies with a still-developing trade deal — which the president said "is coming along nicely."

"We're not talking about removing [tariffs], we're talking about leaving them for a substantial period of time, because we have to make sure that if we do the deal with China that China lives by the deal," Trump told reporters on the White House lawn as he left to visit an Ohio manufacturing plant.

The president's comments come amid conflicting reports about how close the world's two largest economies are to reaching a deal and just what China is willing to concede in talks. Negotiations will restart next week when U.S. Trade Representative Robert Lighthizer and Treasury Secretary Steven Mnuchin travel to Beijing.

Trump stressed that "we're getting along with China very well" as the countries try to strike a deal and ease trade tensions that threaten sustained damage to U.S. businesses.

"President Xi [Jinping] is a friend of mine," Trump said. "The deal is coming along nicely. We have our top representatives going there this weekend to further the deal."

Major U.S. stock indexes initially dipped following Trump's remarks Wednesday. If Trump keeps duties on Chinese goods for an extended period of time, it could not only pass higher costs on to American businesses and consumers but also hurt exporters vulnerable to China's retaliatory tariffs.

The president has used the duties as a negotiating tool to push China toward a trade agreement. The Trump administration has so far put tariffs on $250 billion worth of Chinese imports. China has slapped duties on $110 billion in U.S. products.

Trump has held off on increasing tariffs on $200 billion in Chinese goods to 25 percent from 10 percent as he seeks a deal.

On Tuesday, Bloomberg News reported that China had backed off certain concessions as it sought assurances that the U.S. would remove tariffs. However, The Wall Street Journal later reported that trade talks are in their final stages.

Trump's comments Wednesday reflect the muddled messaging that has come from the administration throughout the negotiations.

Subscribe to CNBC on YouTube.