WASHINGTON — Donald Trump was not at the “Three Amigos” summit of North American leaders Wednesday, but his presence hung over the continental conference anyway.

The leaders of the United States, Canada and Mexico took turns rebutting the Republican presidential candidate’s proposals on trade and immigration. As they met in Ottawa, Trump was 340 miles away in Bangor, Maine, promising to build a wall at the Mexican border and get the United States out of the North American Free Trade Agreement that forms the basis of economic cooperation among the three countries.

In what he himself called a press conference-ending “rant,” President Obama took a whack at Trump’s populist credentials, painting the billionaire real estate mogul as part of the global elite.

“Now somebody else who has never shown any regard for workers, who has never fought on behalf of social justice issues,” Obama said, “they don’t suddenly become a populist because they say something controversial in order to win votes. That’s not the measure of populism. That’s nativism or xenophobia or worse. Or it’s just cynicism.”

“We should take some of his rhetoric seriously and answer it boldly and clearly, but you shouldn’t take that as representative of how the American people think,” he said.

In a three-way press conference in Ottawa, reporters from all three countries asked questions about Trump to all three leaders, who each echoed a common theme: Increased trade and integration is good for all three countries.

“It is my firm belief that shaping (globalism) in accordance with the values that our three countries care deeply about is going to be good for us,” Obama said. “And us trying to abandon the field and pull up the drawbridge around us is going to be bad for us.”

Mexican President Enrique Pena Nieto repeated his comparison of today’s anti-global ideologies with that of 20th century dictators, and urged peoples not to “choose the road toward isolationism and destruction.”

“In the past, some leaders addressed their society in those terms,” he said in Spanish. “Hitler and Mussolini did that and the outcome is clear: It resulted in devastation, and it turned out to be a tragedy for mankind.”

Still, the three leaders were careful to rebuff Trumpism without attacking Trump himself.

“One of the things that’s easy to forget in the inflated rhetoric of an election campaign is that the relationship between our three countries is a lot deeper than the individual leaders,” said Canadian Prime Minister Justin Trudeau. “Our strategy is to highlight how much trade and positive agreements among our nations are good — not only for the economy of the world, and the economy of our countries, but it’s also good for our citizens.”

Even Obama tried to help his neighbors off the on that count, noting that he’d demur too in their position.

“When I visit other countries, it’s not my job to comment on candidates in the middle of a race, because they might end up winning,” he said. “There’s times when I visit other countries that I’ve got preferences, but I rarely express them.”

In addition to three-party agreements on clean energy, the summit also yielded what Trudeau called a concrete example of how the continent can benefit from increased integration: Canada and Mexico announced an agreement to strengthen their trade and travel ties, with Canada allowing visa-free travel for Mexican citizens and Mexico opening its markets to Canadian beef.