With two months to go until the presidential elections, President Obama is already reflecting on the widespread appeal of the Republican party’s nominee, Donald Trump, and attributing the billionaire’s success to those “folks who feel left out.”

“There’s a long tradition in the United States of inclusion, immigration diversity, but also people -- once they’re included in what they consider to be the real America -- worrying about outsiders contaminating, polluting, messing up a good thing,” the president said in a CNN interview that aired Sunday morning. “That’s not new. That dates back to you know, the beginning of this country.”

Trump, whose hardline immigration policies and plans to restrict Muslims from entering the U.S., has then “been able to appeal to a certain group of folks who feel left out or are worried about the rapidity of demographic change, social change,” Mr. Obama said.

Get Breaking News Delivered to Your Inbox

The president noted that “in some cases” those groups of people “have very legitimate concerns around the economy and are feeling left behind.”

But Mr. Obama argued that those making up Trump’s base are not the majority of America.

For the “next generation,” he said, the Republican nominee’s policies don’t carry the same appeal.

“If you talk to younger people, the next generation of Americans, they completely reject the kinds of positions that he’s taking,” the president said.

“I think that anytime we hear intolerance, anytime we hear policy measures that are contrary to our values -- banning certain classes of people because of who they are and what they look like, what faith they practice -- we have to be pretty hard about saying ‘no’ to that,” he continued. “And I think America will do that this time, as well.”

Trump, Obama said, has “been able to appeal to a certain group of folks who feel left out or are worried about the rapidity of demographic change, social change, who, in some cases, have very legitimate concerns around the economy and are feeling left behind.”

In CNN’s wide-ranging interview, the president also touched on U.S. trade with China, defending his landmark Trans Pacific Partnership (TPP) deal as a “historic agreement.”

“This is going to be the world’s largest market,” Mr. Obama said of the 12-nation pact. “And if we’re not setting the rules out there, somebody else is.”

Addressing some progressive broadsides against TPP, Mr. Obama said his administration has worked to include high labor standards in trade deals.

“Yes, there’s going to be a reaction against globalization and against trade,” the president said, acknowledging some of the criticisms from both the liberal and conservative wings. “Whether that resistance is coming from the left or the right, the prescriptions that they’re describing -- somehow cutting off global trade -- aren’t really viable.”