Mr. Trump said the United States had reached a “phase one” agreement that would take several weeks to write and would likely be signed by both sides in November. The deal involves China buying $40 billion to $50 billion worth of American agricultural products, along with agreeing to guidelines on how it manages its currency. The agreement would also include some provisions on intellectual property, including forced technology transfer.

“We have an agreement on intellectual property,” Mr. Trump said during a meeting with Liu He, China’s vice premier, in the Oval Office.

The agreement, which came during the 13th round of negotiations, will help defuse a prolonged trade fight that has begun inflicting pain on the global economy and was set to escalate next week. In his quest to force China to acquiesce to America’s terms, Mr. Trump has already taxed $360 billion worth of Chinese products and was poised to tariff nearly every laptop, dresser and toy that China sells to the United States before year-end.