Associated Press

NEW YORK (AP) – Appearing on Broadway for one night only: Barack Obama, in a solo comedy act roasting the Republican Party.

The president left a crowd of more than 1,300 in stiches on Monday night at the Richard Rodgers Theatre, home to the hit musical "Hamilton" about Founding Father Alexander Hamilton. The cast staged a special performance for a Democratic National Committee fundraiser, with Obama as the encore.

Deviating from his typical fundraiser spiel, Obama said the 2016 Republican presidential candidates seem to "occupy a different reality" in which the country has taken a perilous turn since he took office nearly seven years ago.

"According to them, everything was really good in 2008, when we were going through the worst economic crisis in our lifetimes," Obama said. "This, apparently, was the golden age that I messed up."

"And they’re so glum," Obama added, barely containing his feelings about the GOP cast of characters seeking his job. "They’re really so frustrated."

Tweaking Republicans who question climate change, Obama likened it to having 99 out of 100 doctors tell someone they have diabetes and having that person brush it off as a conspiracy.

"All 99 of those doctors got together – with Obama – to try to prevent me from having bacon and doughnuts," Obama said to laughter in the ornate Times Square theater. "It’d be funny – except this is about climate change. This was an analogy."

He recalled incredulously how a GOP senator stood on the floor of the Senate with a snowball to question global warming, and whipped out a phrase perhaps borrowed from one of his daughters. "It’s cray!" he said.

As the 2016 race has picked up steam, Obama has largely stayed on the sidelines, only occasionally offering his own commentary. Instead, he’s been trying to lay the groundwork for Democrats to make a persuasive economic case in the general election.

He seemed to let loose at Monday’s performance, which drew roughly 1,300 donors who paid between $500 and $10,000 a pop.

Before the curtain fell, Obama took a last jab at the Republican field over foreign policy, mocking claims by Donald Trump and others that relations with Russian President Vladimir Putin would improve if they were elected.

"And then it turns out they can’t handle a bunch of CNBC moderators," Obama quipped, poking fun at candidates’ complaints about last week’s GOP presidential debate. "If you can’t handle those guys, I don’t think the Chinese and the Russians are going to be too worried about you."

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

Join our Newsletter for the latest news right to your inbox