HONOLULU — President Obama expressed confidence that, if he had run for a third term, he would have defeated Donald J. Trump, according to an interview released Monday with David Axelrod, his friend and former adviser.

“I’m confident that if I — if I had run again and articulated it, I think I could’ve mobilized a majority of the American people to rally behind it,” Mr. Obama said on Mr. Axelrod’s podcast, “The Axe Files,” referring to his message of inclusion and helping middle-class Americans.

“I know that in conversations that I’ve had with people around the country, even some people who disagreed with me, they would say the vision, the direction that you point towards is the right one,” he said.

Several hours after the interview was posted, Mr. Trump responded on Twitter. “President Obama said that he thinks he would have won against me,” Mr. Trump said. “He should say that but I say NO WAY! — jobs leaving, ISIS, OCare, etc.”