On Thursday night, the presidential candidates spoke at the quadrennial election-year ritual that is the Alfred E. Smith Dinner. Smith was a former governor of New York and the foundation that bears his name hosts the black-tie dinner, at which it is traditional for even the most stolid and humorless elected officials to loosen up and tell a few jokes at their own and their opponents' expense.

President Barack Obama opened his remarks by asking everyone to take their seats, "otherwise Clint Eastwood will yell at them."

"In less than three weeks," he said, "voters in states like Ohio, Virginia and Florida will decide this incredibly important election, which begs the question, what are we doing here? Of course, New Yorkers also have a big choice to make. You have to decide which one of us you want holding up traffic for the next four years."

The white tie and evening gown clad audience laughed heartily as Obama slammed his performance in the first presidential debate in Denver, Colorado.

"This is the third time that Governor Romney have met recently. As some of you may have noticed, I had a lot more energy in our second debate. I felt really well rested after the nice long nap I had in the first debate," he said.

The president then went on to apologize to Democrats who may have been alarmed by his lackluster performance in Denver, particularly Chris Matthews, who unleashed an epic rant on the night of the first debate. Obama said, "Four years ago, I gave him a thrill up his leg; this time around, I gave him a stroke."

Other topics the president tackled included the ban in New York City on large-sized sugary sodas ("Now, win or lose, this is my last political campaign so I'm trying to drink it all in. Unfortunately Mayor Bloomberg will only let me have 16 ounces.") and vice presidential candidate Rep. Paul Ryan (R-WI)'s clumsy fib to radio pundit Hugh Hewitt about his marathon time ("And I have to admit, it can be a grind. Sometimes it feels like this race has dragged on forever, but Paul Ryan assured me that we've only been running for two hours and fifty something minutes.").

Watch President Obama's remarks from the Alfred E. Smith Dinner, embedded via "The Rachel Maddow Show," below:

Visit NBCNews.com for breaking news, world news, and news about the economy