WASHINGTON (AP) — President Donald Trump this week extended a trade truce with China for another 90 days, delaying a showdown between the world’s two biggest economies.

Trump posted on his Truth Social platform that he signed the executive order for the extension and that “all other elements of the Agreement will remain the same.” Beijing at the same time also announced the extension of the tariff pause, according to the Ministry of Commerce.

The previous deadline was set to expire at 12:01 a.m. Tuesday.

Had that happened, the United States could have ratcheted up taxes on Chinese imports from an already high 30 percent and Beijing could have responded by raising retaliatory levies on American exports to China.

The pause buys time for the two countries to work out some of their differences, perhaps clearing the way for a summit later this year between Trump and Chinese President Xi Jinping, and it has been welcomed by the U.S. companies doing business with China.

Sean Stein, president of the U.S.-China Business Council, said the extension is “critical” to give the two governments time to negotiate a trade agreement that U.S. businesses hope would improve their market access in China and provide the certainty needed for companies to make medium- and long-term plans.

“Securing an agreement on fentanyl that leads to a reduction in U.S. tariffs and a rollback of China’s retaliatory measures is acutely needed to restart U.S. agriculture and energy exports,” Stein said.

China said it would extend relief to American companies that were placed on an export control list and an unreliable entities list. After Trump initially announced tariffs in April, China restricted exports of dual-use goods to some American companies, while banning others from trading or investing in China. The Ministry of Commerce said it would stop those restrictions for some companies, while giving others another 90-day extension.

China tested the limits of a U.S. trade policy built around using tariffs as a cudgel to induce concessions out of trading partners. Beijing had a cudgel of its own: cutting off or slowing access to its rare earths minerals and magnets, used in everything from electric vehicles to jet engines.

In June, the two countries reached an agreement to ease tensions.

The United States said it would pull back export restrictions on computer chip technology and ethane, a feedstock in petrochemical production. China agreed to make it easier for U.S. firms to get access to rare earths.

“The U.S. has realized it does not have the upper hand,’’ said Claire Reade, senior counsel at Arnold & Porter and former assistant U.S. trade representative for China affairs.

In May, the U.S. and China had averted an economic catastrophe by reducing massive tariffs they’d slapped on each other’s products, which had reached as high as 145 percent against China and 125 percent against the United States.

Those triple-digit tariffs threatened to effectively end trade between the United States and China and caused a sell-off in financial markets. In a May meeting in Geneva, they agreed to back off and keep talking: America’s tariffs went back down to a still-high 30 percent and China’s to 10 percent.

Having demonstrated their ability to hurt each other, they’ve been talking ever since.