President Trump holds up the executive order he signed withdrawing the United States from the Trans-Pacific Partnership. (Ron Sachs / Pool/European Pressphoto Agency)

THE TRANS-PACIFIC Partnership trade agreement was already politically dead by the time President Trump buried it Monday, via a formal notification that the United States would withdraw. After Mr. Trump’s victory in November, Congress made no attempt to ratify the 12-nation tariff-slashing pact when President Barack Obama, the TPP’s intellectual author, was still in office. Mr. Obama argued, correctly — and consistently with post-World War II American foreign policy — that the United States had much to gain, economically and strategically, from thickening the network of connections with friendly countries such as Japan, Australia and Mexico.

China, which would have been left out of the TPP, is the immediate winner from Mr. Trump’s move; it is already acting to fill the gap that Mr. Trump blithely created without offering any plausible alternative. Beijing must be doubly pleased that the same result might have occurred even if Hillary Clinton had been elected, since she backed off her previous support of the TPP in the face of a simplistic Democratic backlash led by Sen. Bernie Sanders (I-Vt.). Several Democratic senators, joined by the president of one of their party’s most powerful interest groups, the AFL-CIO, hailed Mr. Trump’s decision. Unfortunately, the formerly bipartisan consensus in favor of international engagement and responsibility is morphing into a bipartisan consensus against them.

Mr. Trump now turns his attention to the North American Free Trade Agreement, under which the flow of goods and services among the United States, Canada and Mexico has multiplied many times over since the pact took effect in 1994. Mr. Trump talks endlessly and extravagantly of jobs “stolen” by Mexico under NAFTA, and much manufacturing work has migrated from American factories to Mexican ones. A renegotiation of NAFTA, which Mr. Trump claims to want, beginning with upcoming conversations with the leaders of Mexico and Canada, is not inherently a bad idea. What relationship wouldn’t benefit from a tuneup after a quarter-century? Specifically, there may be a need to revisit NAFTA’s “domestic content” rules to make sure products that flow tariff-free among the three countries truly originate within one of them.

That assumes Mr. Trump comes to the table in good faith and with a balanced view of relevant facts. His fixation on high-profile automobile plant sitings in Mexico — coupled with his repeated threats of a “border tax” on firms that exercise their rights to produce there — does not inspire confidence.

Automation, not trade, is the real culprit in manufacturing job loss. And while NAFTA has surely created winners and losers within the United States, overall it has not been the horrific deal Mr. Trump suggests. The combined trade deficit with Mexico and Canada was $73.4 billion in 2015 (the most recent full year for which data exist). Subtract petroleum and it shrinks to $13.9 billion, a rounding error for the $18 trillion U.S. economy. Chances are that the deficit will shrink as American oil producers crank up for exports.

A smart negotiator would take all that into account before risking trade wars that might do far more damage to American companies, workers and consumers than the status quo allegedly does.