Washington (AFP) - President Barack Obama says he could have been reelected for a third term and that the nation still largely embraces his political vision despite last month's election of Donald Trump to succeed him.

The US leader's remarks were made in an interview posted on the podcast "The Axe Files," produced by CNN and the University of Chicago.

Obama, who ends his second and final term in office in just over three weeks, said he believes the American public still supports his progressive vision, despite having voted for Trump -- his political opposite.

"I am confident in this vision because I'm confident that if I had run again and articulated it, I think I could've mobilized a majority of the American people to rally behind it," Obama tells the interviewer, his former senior adviser David Axelrod, in the most recent of several exit interviews he has been conducting.

But President-elect Donald Trump took to a favored platform, Twitter, to reject Obama's supposition.

- 'No way!' : Trump -

"President Obama said that he thinks he would have won against me. He should say that but I say NO WAY! - jobs leaving, ISIS, OCare, etc.," he tweeted, referring to the president's signature health care plan.

Hillary Clinton was defeated by Trump in a stunning outcome almost no one predicted, and Obama was philosophical and a little rueful in the interview regarding the Democrats' loss.

"Losing's never fun," he tells Axelrod, a political strategist who helped craft Obama's winning 2008 presidential campaign and then followed him to the White House.

"I'm proud that I have tried to conduct myself in office to do what I think is right rather than what is popular, I always tell people don't underestimate the public humiliation of losing in politics," Obama said.

"It's unlike what most people experience as adults, this sense of rejection."

But he was also proud of the way the progress made in the two terms of his presidency, thanks to the "spirit of America," especially evident in the younger generation.

Story continues

"That spirit of America has still been there in all sorts of ways. It manifests itself in communities all across the country," Obama said.

"We see it in this younger generation that is smarter, more tolerant, more innovative, more creative, more entrepreneurial, would not even think about, you know, discriminating somebody against for example because of their sexual orientation," the president said.

"All those things that I describe, you're seeing in our society, particularly among 20-year-olds, 30-year-olds.'

Despite the election of Trump -- a Republican who appears set to put in place policies that will take the country sharply to the right -- during his presidency "the culture actually did shift," Obama told Axelrod.

"The majority does buy into the notion of a one America that is tolerant and diverse and open and full of energy and dynamism," the US president said.

"The problem is, it doesn't always manifest itself in politics."