President Barack Obama defended his administration's nuclear deal with the Iranians -- on "The Daily Show" with comedian Jon Stewart.

Responding to skeptics who think Obama's team should have pushed harder at the negotiating table, Obama said: "When you hear the critics talk about well it's a bad deal, we could have got a better deal, you then ask them, well, what represents a better deal?" Obama said, in a discussion that touched on veterans, health care and Obama's legacy. "Typically, they are vague and they fall back on, 'Well, if you beat your chest a little bit more, or if you brought Dick Cheney to the negotiations . . .' "

Obama was making his seventh and final guest appearance since 2005 on "The Daily Show with Jon Stewart." The funny man's final episode will air Aug. 6.

"You know, I can't believe that you're leaving before me," said the term-limited Obama. "In fact, I'm issuing a new executive order -- that Jon Stewart cannot leave the show."

Said Stewart: "I have to say, for me, this is a states rights issue."

Stewart ditched his usual monologue and devoted nearly the entire show, which aired at 11 p.m., to Obama.

Pressed about the Iran deal and other subjects, Obama encouraged Americans to participate in politics, because: "If people are engaged, eventually the political system responds despite the money, despite the lobbyists, it still responds."

Stewart retorted: "Is that the advice that you then bequeath to future President Trump?"

Obama said: "Well, I'm sure the Republicans are enjoying Mr. Trump's dominance."

Stewart added: "Anything that makes them look less crazy."