WASHINGTON — President Trump said on Friday that China was a “threat to the world” and suggested Beijing was eager to make a trade deal because his tariffs were hurting the Chinese economy, coarsening his tone as the two countries prepared to resume negotiations.

The Trump administration has closely tied economic policy and national security and, in remarks at the White House, Mr. Trump said that China was using money pilfered from the United States through unfair trade practices to build up its military. The comments come as midlevel officials from both countries have been holding talks in Washington this week ahead of a planned meeting between senior trade negotiators next month.

“Obviously, China is a threat to the world in a sense, because they’re building a military faster than anybody,” Mr. Trump said. “I view China in many different ways. But right now, I’m thinking about trade. But, you know, trade equals military.”

Mr. Trump also tried to put to rest speculation that he might settle for an interim deal to give markets a lift ahead of the presidential election next year.