WASHINGTON—Donald Trump’s presidency has so far been largely good for big business and investors, with deregulation in train, hopes for corporate tax cuts, and stocks hitting records. But the risk of a serious jolt now looms: the potential end of the North American Free Trade Agreement, which has governed continental commerce for a quarter-century.

Because the likelihood of a collapse has seemed so remote, analysts are only now starting to assess the implications. The early read: It wouldn’t necessarily be catastrophic, but it would be a net negative for the overall economy, cause a big squeeze to some sectors and states and could dent stocks.

“The reversal of Nafta leads to a decline in real GDP, trade, investment, and employment in the U.S., Canada and Mexico,” concludes one of the first detailed studies on the subject, by ImpactECON LLC, a Colorado-based economic consultancy. The firm estimates that while some production would move north of the border with Mexico, the U.S. would still suffer a net loss of 256,000 U.S. jobs over three to five years. Mexico would lose 951,000 jobs and Canada 125,000.

Nafta isn’t dead yet. Talks to rewrite the pact are continuing, with fresh rounds scheduled through year-end. Even successful negotiations hit rough patches, as partners lay down extreme demands assuming they’ll soften during bargaining.

But the current round—launched last week and slated to run through Tuesday—has proved unusually contentious. U.S. proposals, like a sunset clause that would subject the deal to regular renewal or a requirement that cars have 50% U.S.-only content to qualify for Nafta breaks, have been branded unacceptable by Mexico and Canada. With wide gaps remaining, all sides now talk openly about the risk of a Nafta collapse.