President Obama pushed back Wednesday on Donald Trump’s calls to overhaul or abandon international trade agreements, saying at a summit in Canada that any move to “pull up the draw bridge” would be bad for the country.

Without referencing Trump by name, the president was responding in part to the presumptive Republican presidential nominee’s anti-globalization rhetoric this week.

Obama said that while ordinary people have a “legitimate gripe” about globalization, he has concerns about rising “protectionism” from the left and the right.

“That’s the wrong medicine,” Obama said of “prescriptions” to withdraw from trade deals. “That’s going to make all of us poor.”

Obama was speaking at an Ottawa press conference alongside Canadian Prime Minister Justin Trudeau and Mexican President Enrique Pena Nieto, in between talks among the three leaders.

Trade, the environment and fallout from Britain's decision to leave the European Union had been expected to top the agenda.

The summit followed a blistering speech a day earlier from Trump in which he threatened to exit the more than two-decade-old North American Free Trade Agreement and vowed to withdraw from the Trans-Pacific Partnership, an agreement among 12 Pacific Rim nations that has yet to take effect.

"This wave of globalization has wiped out totally, totally our middle class," Trump said, standing in front of pallets of recycled aluminum cans on a Pennsylvania factory floor. "It doesn't have to be this way. We can turn it around, and we can turn it around fast."

Obama also planned to address the Canadian Parliament -- the ninth American leader to do so and the first since Bill Clinton in 1995.

As for the so-called “Brexit” vote nearly one week ago, Obama on Wednesday downplayed the short-term impact.

He said the U.S. is watching for signs of financial strain but predicted the global economy would “hold steady” in the short-run. Obama said there are “genuine longer-term concerns about global growth if in fact Brexit goes through.”

The president called for an “orderly” process, saying: “It does not need to be a panicky process.”

Trudeau and Pena Nieto, meanwhile, announced measures to reduce barriers during the Mexican leader's state visit to Canada before the summit.

Trudeau said Canada will lift visa requirements for Mexican visitors as of December 2016. Pena Nieto agreed to open Mexican markets to Canada beefs.

The leaders also announced a pledge to rely on more renewable energy sources to generate North America's electrical power. 

The Associated Press contributed to this report.