U.S. President Barack Obama hit back Wednesday at the idea Donald Trump is a populist, calling the Republican presidential contender's controversial statements xenophobic and cynical.

Following several questions from reporters covering the Three Amigos' summit in Ottawa, including queries about his potential successor in the White House, Obama wrapped up an answer to a question on clean energy and went back to the subject of Trump -- without naming him directly.

"If you'll allow me, I want to say one last thing though because it's been a running thread in a bunch of questions. And that's this whole issue of populism... I’m not prepared to concede the notion that some of the rhetoric that’s been popping up is populist," the American president said.

Obama went on to describe some of his values, including wanting every child to have the opportunities he had, the ability of workers to have "a collective voice," and the need for subsidized education and childcare.

"I suppose that makes me a populist. Somebody else who has never shown any regard for workers, has never fought on behalf of social justice issues or making sure that poor kids are getting a decent shot at life, or [that they] have health care. [Who] in fact have worked against economic opportunity for workers and ordinary people -- 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, that's just cynicism," Obama said.

"Where've they been? Have they been on the front lines, working on behalf of working people?"

Obama said someone like Democratic presidential contender Bernie Sanders genuinely deserves the populist title because he fights on behalf of people. In that case, Obama said, they share goals but the question is how to achieve them.

Trump's approach to some of America's economic problems has been to pull out of NAFTA, a position Obama, Prime Minister Justin Trudeau and Mexican President Enrique Pena Nieto criticized throughout the press conference. The leaders said isolating a country would only exacerbate its problems by making trade harder.

"The global economy's one of those areas where there aren't a lot of simple solutions. And there aren't a lot of shortcuts to making sure that more people have opportunity in our countries," Obama said.

Reporters pressed Obama, Trudeau and Pena Nieto on protectionism in the midst of Trump's assertions that NAFTA has hurt Americans, and just days after the U.K. voted in favour of leaving the European Union. Trudeau and Pena Nieto said they would work with whomever is elected in the U.S. in November and that they respect the democratic process, although Pena Nieto warned against Trump's approach, which has included threatening to force Mexico to build a wall between it and the U.S.

"In the past some leaders addressed their societies in those terms. Hitler and Mussolini did that. And the outcome is clear to everyone. It resulted in devastation and turned out to be a tragedy for mankind," Pena Nieto said.

Obama pointed to Trump's controversial anti-immigrant stance as another indicator that populism is the wrong descriptor.

"Let's just be clear that somebody who labels 'us versus them' or engages in rhetoric about how we’re going to look after ourselves, and take it to the other guy, that’s not the definition of populism," he said.

More than five minutes after he started his response, Obama looked at Trudeau and Pena Nieto and wound down.

"I'm sorry," he said. "It is one of the prerogatives of when you're at end of term, you just kind of, you go on these occasional rants."