WASHINGTON -- President Barack Obama laid into Donald Trump on Wednesday for claiming to be a populist, saying that just because he criticizes trade deals doesn't mean he's ever put the interests of ordinary people over his own.

"I'm not prepared to concede the notion that some of the rhetoric that's been popping up is populist," Obama said at the start of a tirade during a press conference at the North American Leaders Summit in Canada.

"Let's just be clear," he said. "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."

The president never mentioned Trump's name, but the person he was talking about was clear. Minutes earlier, Obama had rebuked Trump for advocating a renegotiation of the North American Free Trade Agreement, or pulling out of it altogether if Canada and Mexico refuse to make it more favorable for American workers.

"That's not the measure of populism. That's nativism. Or xenophobia. Or worse. Or it's just cynicism," Obama said. "So I would just advise everybody to be careful about suddenly attributing to whoever pops up at a time of economic anxiety the label that they're a 'populist.'"

If anyone can claim to be a populist, Obama said, it's either him -- he said he ran for president twice because he cares about fair pay, kids getting a good education, and helping poor people who "don't have a chance to advance" -- or Sen. Bernie Sanders (I-Vt.)

"He genuinely deserves the title because he has been in the vineyard fighting on these issues," Obama said. That's in contrast to someone "who has never shown any regard for workers, has never fought on behalf of social justice issues or making sure poor kids are getting a decent shot at life, or have health care -- in fact, has worked against economic opportunities for workers and ordinary people. They don't suddenly become a populist because they say something controversial in order to win votes."

With the press conference over for several minutes, Obama ended his tirade in front the Canadian prime minister, the Mexican president and a captive audience.

"Sorry," he said, chuckling. "This is one of the prerogatives when you're at the end of your term. You just go on these occasional rants."

Editor's note: Donald Trump regularly incites political violence and is a serial liar, rampant xenophobe, racist, misogynist and birther who has repeatedly pledged to ban all Muslims -- 1.6 billion members of an entire religion -- from entering the U.S.