The question hanging over the summit of North America's leaders was always going to be about U.S. President Barack Obama and his successor: How much of this would be about legacy, and how much about lame duck?
A lot of the answer revolves around one possible successor, Republican Donald Trump. That's especially so for Mr. Obama's summit partners, Prime Minister Justin Trudeau and Mexican President Enrique Pena Nieto. They see Mr. Trump threatening to abandon the North American free-trade agreement and block borders, and worry the United States will, as Mr. Pena Nieto expressed it, abandon continental progress and succumb to demagoguery and populism.
Then Mr. Obama, the lame duck, took on a legacy fight – taking an axe to the things Mr. Trump stands for, and Mr. Trump himself.
Populist? Mr. Trump is no populist, the President said. Mr. Obama said he ran for president because he cared about kids. Now, "somebody else who has never shown any regard for workers … who in fact, have worked against economic opportunity for workers and ordinary people – they don't suddenly become populist because they say something controversial to win votes."
"That's not the measure of populism. That's nativism. Or xenophobia. Or worse. Or it's just cynicism," he said.
It was an unchained argument from a president freed from campaigning for re-election. Mr. Obama called it the kind of "rant" that is the prerogative of outgoing presidents and it lasted nearly seven minutes at the end of the summit's closing news conference. But it was only part of a broader message that Mr. Obama came to deliver, aimed at Mr. Trump, and the anxieties he has created among the United States' neighbours.
Mr. Obama's trip to Ottawa for the North American summit was a stage to argue against the forces of isolationism and protectionism, symbolized by Brexit and led in the United States by Mr. Trump. This was Mr. Obama, the rhetorical force, a President in his last months making his case for what comes after.
The integrated global economy can't be prevented, Mr. Obama said. "That's here," he said. "That's done." The question is how to influence the rules, not to "abandon the field and pull up the drawbridge around us."
He said those who feel they haven't benefited from trade have a "legitimate gripe," as the wealthy have gained while workers' wages stagnated – and that must be addressed. But automation has done more to displace manufacturing jobs than trade, he argued, and the only answer is to build an international order "that works for our people." Cutting off trade, he said, is "going to make us all poor."
For Mr. Trudeau and Mr. Pena Nieto, this was the case they needed a U.S. president to make. After Brexit and the rise of Mr. Trump, they want a powerful U.S. political voice to push back the sentiments that threaten their key interests in trade, travel and continental co-operation. Mr. Obama reached higher flights of oratory later on Wednesday, in his address to Parliament – but the open-border, open-U.S. message was clearly what Mr. Obama felt, and it was what Mr. Trudeau and Mr. Pena Nieto needed to hear. They can only hope the rhetoric leaves a legacy.
But the substance of the summit, the agreements reached by the leaders, still depend on Mr. Obama's successor. This President cannot follow through and the next president might not be willing.
For Mr. Trudeau, the North American summit was a chance to show off warming relations with the United States and Mexico that had become strained under Stephen Harper. But the outgoing U.S. President could never deliver a great deal.
The major new area of co-operation, climate change, depends on what comes after Mr. Obama. There were sizable steps: Mexico joined pledges made by the United States and Canada to slash methane emissions, and they agreed to work on renewable-energy goals and to advance cross-border electricity transmission. But the U.S. part of those things won't be done before Mr. Obama leaves office, so it depends on his successor. If it's Hillary Clinton, much of it might advance. If it's Mr. Trump, it's off.
But at Mr. Obama's last Three Amigos summit, with the campaign of Mr. Trump and an isolationist mood in the United States, Mr. Trudeau and Mr. Pena Nieto were probably more grateful for the rhetoric – when Mr. Obama, the lame duck, sought to leave a legacy by fighting over what comes next.