President Trump, center, looks over at Canada's Prime Minister Justin Trudeau's document as they and Mexico's President Enrique Pena Nieto sign a new United States-Mexico-Canada Agreement in Buenos Aires on Nov. 30. (Martin Mejia/AP)

THE TRADE truce this past weekend between the United States and China gave U.S. business a dose of confidence — which President Trump undid Tuesday with a series of Twitter messages suggesting he is still “a tariff man” whose patience with Beijing is growing short. The Dow Jones industrial average, which had risen almost 300 points on Monday, dropped almost 800 points on Tuesday. Mr. Trump then sent upbeat signals Wednesday (when the markets were closed for a day of mourning in honor of former president George H.W. Bush). The upshot is that uncertainty about U.S. trade policy continues to plague an otherwise robust economy, and that much of it has been created by the president himself, first by launching various trade wars, then by conducting them erratically.

Ironically, the best way for Congress, soon to be divided between a Democratic House and a Republican Senate, to help would be to give Mr. Trump something he wants: approval of the modified trade agreement he has negotiated with Mexico and Canada to replace the North American Free Trade Agreement.

The deal exists because Mr. Trump exaggeratedly blamed NAFTA for industrial job losses and pledged to either renegotiate or end it. NAFTA needed a refresh after a quarter-century in force: new rules on digital trade and a ban on localized data-storage requirements in the three member nations. Those are in Mr. Trump’s proposed deals, along with useful changes (more U.S. access to Canada’s protected dairy market) and possibly counterproductive ones (stricter rules on NAFTA-origin inputs for auto manufacturers and, for Mexico, a $16-an-hour minimum wage for certain auto workers).

On the whole, however, the new bargain represents a tweak of NAFTA that, if enacted, would stabilize a hemispheric trade area that Mr. Trump had threatened to destabilize. Mr. Trump’s team expects eventual approval because many changes it negotiated — especially the auto-industry rules — were on the wish list of the Democrats and their allies in organized labor. But the temptation for the likely next speaker of the House, Nancy Pelosi (D-Calif.), would be to turn the deal down and thus deny Mr. Trump a victory. On Friday, she said the deal still lacks “enough enforcement reassurances” regarding her party’s priority issues. Meanwhile, Senate Republican supporters of free trade object to the deal’s attempt to manage trade in autos. Mr. Trump pressured Congress by threatening to withdraw from NAFTA, which, if he follows through, could present lawmakers with a choice between accepting his deal and a potentially disastrous return to the pre-NAFTA status quo.

The politics of trade have been scrambled by the simultaneous rise of a protectionist Republican president and a shift in the Democratic Party’s base from unionized industrial areas to suburbs. The hope is that there may be enough strange political bedfellows to create a bipartisan majority in each chamber of Congress.

Prompt ratification of this less-than-optimal deal, fleshed out, if need be, with language in the implementing statutes to address Ms. Pelosi’s concerns, would stabilize the hemispheric economy, enabling the United States and its allies to focus efforts on the country Mr. Trump has properly, if hyperbolically, identified as a genuine obstacle to free trade: China.