OTTAWA, Ontario (CBSNewYork/AP) — President Barack Obama and the leaders of Mexico and Canada pushed back forcefully on Wednesday against the isolationist and anti-immigrant sentiments that have roiled Britain and been championed by GOP presidential candidate Donald Trump. The leaders warned against easy solutions peddled by “demagogues” who feed on economic anxiety.

With tensions growing over terrorism and fallout from Britain’s exit from the European Union, Obama acknowledged that Americans and others have reason to be concerned about their own future in a rapidly globalizing economy. He said concerns about immigrants had been exploited by politicians in the past, but he insisted he wasn’t worried Americans will follow that path.

READ MORE: Supply Chain Issues: 'There Really Are Problems Everywhere,' Even For Small Companies

“We should take some of this seriously and answer it boldly and clearly,” Obama said, without naming the Republican presidential candidate. “But you shouldn’t think that is representative of how the American people think.”

Gathering in the Canadian capital, the leaders defended their calls for freer trade within the continent and beyond. They argued that instead of withdrawing from the world, advanced countries should focus on higher standards, wages and legal protections that would ensure the benefits of globalization are widely felt.

“The integration of national economies into a global economy, that’s here. That’s done,” Obama said.

Obama’s comments at a joint news conference with Canadian Prime Minister Justin Trudeau and Mexican President Enrique Pena Nieto came as the leaders sought a show of unity amid growing nationalist movements in Europe and elsewhere, epitomized by Britain’s move to leave the 28-member EU. Obama also planned to address the Canadian Parliament during his visit, becoming the ninth American leader to do so.

Though Britain’s decision has rattled the global financial system, Obama said he believed the markets were starting to settle down. Still, he acknowledged there would be “genuine longer-term concerns” about global economic growth “if, in fact, Brexit goes through.”

“This doesn’t help,” he said.

Obama said his primary message to British Prime Minister David Cameron and to German Chancellor Angela Merkel, who is largely spearheading Europe’s response, was that “everybody should catch their breath.” Though Merkel and other European leaders have urged Britain to start its withdrawal quickly, Obama called for a thought-out process that would be transparent and clearly understandable to all of Europe’s citizens.

“I think that will be a difficult, challenging process, but it does not need to be a panicky process,” the president said.

The Canadian and Mexican leaders largely echoed Obama’s calls for staying focused on closer economic ties. Pena Nieto said Mexico sees opportunity for growth and investment by broadening its relationship with the rest of the continent.

READ MORE: COVID Vaccine 'Mix-And-Match' Study Finds Moderna Booster After J&J Single-Shot Produced Major Increase In Antibodies

“We are competitors, yes, but we have complimentary economies, and that will give more development to our society,” he said.

And Trudeau said the three leaders’ strategy for combatting protectionist views was to “highlight how much trade and positive agreement 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.”

Yet it was Trump and his insistence that Americans are better served by reasserting independence that shadowed the leaders’ meetings at the annual North American Leaders’ Summit. Even as the three took the podium in Ottawa, Trump was threatening to pull the U.S. out of the North American Free Trade Agreement, chanting at a rally, “No more NAFTA.”

When a reporter asked the leaders to weigh in on Trump, Obama intervened before Trudeau could answer, suggesting he should be careful what he says in case Trump ends up winning.

“I’m not saying they shouldn’t answer. I’m just — I’m helping him out a little bit,” Obama said.

He appeared personally insulted by Trump’s claims to represent the public’s best interests, accusing the presumptive Republican nominee of wrongly purporting to be a populist. He said people like Vermont Sen. Bernie Sanders rightly deserve label of “populist” but that Trump is merely resorting to “nativism,” ”xenophobia” and “cynicism.”

The attack on a Turkish airport in which dozens died on Tuesday added to the urgency of discussions about how the three countries can work together to enhance security. Sitting down earlier with Pena Nieto, Obama said the gun-and-bomb attacks show how little these “vicious organizations” have to offer.

“We will not rest until we have dismantled these networks of hate that have an impact on the entire civilized world,” Obama said.

Ahead of the summit, Trudeau and Pena Nieto announced measures to reduce barriers during the Mexican leader’s state visit to Canada. Trudeau said Canada will lift visa requirements for Mexican visitors as of December 2016. Pena Nieto agreed to open Mexican markets to Canadian beef.

Efforts to curb global warming were a big part of the summit. The leaders pledged to rely on renewable energy to generate 50 percent of North America’s electrical power by 2025. Mexico also committed to joining the United States and Canada in tackling methane emissions.

MORE NEWS: Woman In Critical Condition After Being Struck By Sanitation Truck In Dyker Heights, Brooklyn

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)