“I CAN stop this,” Donald Trump’s chief economic adviser told an aide as the president prepared to sign a letter withdrawing from the North American Free Trade Agreement (NAFTA) last spring. “I’ll just take the paper off his desk.” The episode, as recounted in a new book by Bob Woodward, a journalist, is a reminder of just how tenuous is the continued existence of the world’s largest free-trade area—“one of the worst deals ever”, in Mr Trump’s characterisation.

Mr Trump may have been stopped from wrecking the pact, but he has still undermined it. On August 27th Mexico and the United States announced they had agreed to a bilateral accord on trade. Four days of negotiations to bring Canada in followed. No deal was reached. On August 31st Mr Trump notified Congress of his intent “to enter into a trade agreement with Mexico—and with Canada if it is willing, in a timely manner”. They have until September 29th to reach a compromise. Chrystia Freeland, Canada’s foreign minister, gave a measured response to being shunted aside by her country’s largest trading partner, praising American negotiators for their good faith and saying talks would continue.

The Canadians do not have much choice but to bite their tongues. They have the most to lose. A study by the Bank for International Settlements found that the Canadian economy would contract by 2.2% if NAFTA were to disappear, compared with 1.8% in Mexico and only 0.2% in the United States. Canada’s trade is equivalent to almost 65% of its economy. Most of that is with its giant neighbour, which bought 76% of exports last year and supplied just over 51% of imports. Mr Trump has threatened to slap tariffs on Canadian automotive exports, having already imposed them on newsprint (since overturned), steel, aluminium and solar panels.

The three economies have integrated under NAFTA, making all of them more efficient. However, this makes Canada and Mexico vulnerable to American policy changes. Consider carmaking. Most of the Canadian vehicles Mr Trump is threatening with tariffs are produced in Canada by American firms like GM, Ford and Fiat Chrysler, using parts from Mexico and the United States. By one estimate, bits of each car cross a NAFTA border seven times before the product is finished. In 2016 motor vehicles and parts made up a fifth of physical trade between Canada and America (though that includes components going back and forth). Paperwork at customs would increase without NAFTA, says Laura Dawson of the Wilson Centre in Washington, DC. “If you add two minutes for every truck, that would be chaos.” Canada reckons that although Mr Trump may be willing to disrupt industries whose supply chains cross the border with Canada, wiser heads will stay his hand. (Inconveniently for the Canadians, the letter-swiping adviser has left the White House.)

When it became clear in early 2017 that Mr Trump was serious about changing the deal, Canada revved up its charm offensive. Politicians from both of its major parties lobbied members of America’s Congress and state governors, and courted businesses and unions. They drummed home the message that the United States traded more goods with Canada in 2017 than with any other country bar China (Mexico was third), and that 36 states count Canada as their top export partner. The intense effort seemed to pay off last week, as senators from both American parties argued in favour of a trilateral agreement. Mr Trump reacted by threatening—again—to tear up the deal altogether.

It is unclear what would happen if he did. In theory, Congress could pass legislation blocking his ability to pull out and override his veto. His actions would be challenged in court, amid huge uncertainty for businesses and investors. Even the legality of pushing a bilateral deal through Congress, having promised a trilateral one, is fuzzy.

Call of duties

“Congress may find its spine when it comes to NAFTA,” says Paul Frazer, a Washington-based consultant on government relations. Yet grabbing attention will not be easy in the run-up to mid-term elections, with a spending bill to pass and a Supreme Court nominee to vet, he says. Any uncertainty may only be resolved once the next Congress is seated.

That prolongs the agony for Canada, already suffering an investment chill because of reforms lowering corporate taxes in the United States and doubts about continued access to the North American market. Canadian and foreign firms are hesitating, unsure whether Canada will remain a gateway to the rest of the continent.

For Mexico, however, the uncertainty is nearing its end, to the relief of investors and government alike. Nor do the concessions granted by its negotiators look so bad compared with the outlandish demands with which Mr Trump started. It was this logic that governed the final stage of talks between the United States and Mexico. The president, Enrique Peña Nieto, was desperate for one last accomplishment in his unhappy tenure. His successor, Andrés Manuel López Obrador, a left-winger, is equally keen to take office, on December 1st, with a clean slate, so that he can implement an ambitious domestic agenda.

Yet Mexico’s hurry to get a deal done almost certainly weakened its position at the negotiating table—and contributed to Canada’s isolation. Earlier this summer Mexico abandoned its previous aversion to bilateral talks with the United States, and sat down to discuss rules on cars and other issues. It vowed to avoid subjects that mattered deeply to Canada. It did not, and conceded more ground than Canada had ever planned to.

That may have harmed ties between Mexico and Canada, though both say publicly that they kept in contact all the while. But as Mexico’s relationship with Mr Trump seems to have improved since Mr López Obrador won a landslide election victory in July, Canada’s relations with him have worsened. Mexico, which ships four-fifths of its exports to the United States, may have concluded that it did not want its most important trading relationship to be hostage to Mr Trump’s sentiments towards Canada.

Most of what is added to a revised NAFTA will be worse for Mexico than the original version was. Its negotiators agreed to many American demands without extracting clear concessions in return. These include new rules of origin, which decree that the share of a car’s components made in North America must rise from 62.5% to 75%. And 40-45% of final assembly will need to be done by workers earning an average of $16 an hour or more (which may have been suggested by the Canadians). That will discourage further employment in Mexico, where many workers earn little more than $2 an hour. Nor does Mexico (or indeed Canada) gain anything from a new mechanism to revisit and revise the pact every six years (and to kill it ten years later if no agreement can be found)—though it is not as disastrous as the rolling five-year expiry date the Americans requested. The points on which Mexico claims victory are not improvements but rather the dropping of Mr Trump’s most absurd demands. Canada can live with much of what the United States and Mexico agreed on, including the six-year review and the section on motor vehicles, which Ms Freeland noted required “big changes by Mexico”. But much of the deal remains up in the air. No full text yet exists. The Mexicans have left to Canada negotiations on dispute-settlement mechanisms and public procurement. And the weakening of legal protections for investors agreed to by Mexico could play well in Canada, where such provisions are controversial. The northern dispute that has attracted most of Mr Trump’s ire involves Canada’s dairy products (see article), which accounted for less than 1% of the $582bn in two-way trade in goods last year. Canadian politicians are loth to touch it because just over half of the farms that ship milk are in the French-speaking province of Quebec. Yet this is not an insurmountable obstacle. Canada slightly propped open its cheese market to secure a trade deal with the EU in 2016, and again to reach a trade agreement with ten other Pacific countries last year. Mr Trudeau has already said Canada is flexible on dairy, a sign that it is willing to do something similar to secure NAFTA. Even Philippe Couillard, the premier of Quebec, has not closed the door to changes, saying only that producers would have to agree. The bigger problem is Canada’s wish to retain something like the existing dispute-settlement mechanism, called Chapter 19, that allows countries to challenge the imposition of duties before a bi-national panel, whose decisions are binding. Canada insisted on this mechanism in the original NAFTA negotiations, walking out to make its point. Justin Trudeau, the prime minister, said on September 4th that “we will not sign a deal that is bad for Canadians, and quite frankly, not having a Chapter 19 to ensure that the rules are followed would be bad for Canadians.” Another red line is Canada’s protection of its cultural industries. Canada has always tried to stem the flood of American movies, television and radio broadcasts, newspapers and magazines across the border and is unlikely to stop now. Mr Trudeau reiterated that the cultural exemption, which makes it difficult for American companies to buy Canadian media firms, is non-negotiable.

As in talks with Mexico, Mr Trump’s idea of compromise with Canada involves giving away nothing. At best, it extends to a grudging willingness not to take away things that were already in NAFTA. Mr Trudeau and Ms Freeland have repeatedly said they are prepared to walk away from a bad deal. This is more than bluster. Mr Trudeau would have trouble getting an unpopular accord through Parliament. Even were it to pass, the opposition would lambast Mr Trudeau’s Liberals in an election campaign next year. The cross-party coalition the prime minister stitched together to fight for NAFTA is beginning to fray.

Frank McKenna, a former Canadian ambassador to the United States, observed recently that Mr Trump appears to want a trophy rather than a treaty. The Canadians seem prepared to accommodate his vanity. “They are mindful of the fact that along with the technical details in the deal they have to put a couple of big red bows on it,” says Ms Dawson.

The Mexicans, for their part, are just happy that the long saga is nearly over. Mexico’s Congress is sure to ratify whatever comes in front of it, so long as the president-elect is happy. And they are on firmer ground than the Canadians are. Luis Videgaray, the foreign secretary, said that if Canada does not join the agreement, “we know that there will still be a deal between Mexico and the United States.”