To those closely following the U.S. election campaign, nastiness may seem to have the upper hand to civility in the exchanges between the teams of President Barack Obama and rival candidate Mitt Romney. Yet this week, for the first time in many months, they actually managed to indulge in some friendly banter.

Speaking at the Alfred Smith Memorial Foundation dinner at the Waldorf Astoria hotel in New York City — an event described by the host as a “proving ground for the candidate as entertainer” — the two men lampooned each other’s missteps during the campaign but also engaged in a healthy dose of self-deprecation to much applause and laughter. Acknowledging his underwhelming performance in the first presidential debate on October 3, Mr. Obama said: “I felt really well rested after the nice long nap I had in the first debate.” But he didn’t miss the chance to quip about Mr. Romney’s association with “vulture capitalist” private equity when he said, “Early today, I went shopping at some stores in midtown. I understand Governor Romney went shopping for some stores in midtown.”

Mr. Romney proved he could take himself lightly too, and alluding to the image that some people had of him being a stuffy, wealthy industrialist, he commented on the fact that he was wearing a black tuxedo and a white bow tie: “It’s nice to finally relax and wear what Ann and I wear around the house.”

But he didn’t stop there either, taking his joke about the rich and famous attending the evening’s events further: “As President Obama surveys the Waldorf banquet room, with everyone in white tie and finery, you have to wonder what he’s thinking: so little time, so much to redistribute.”

With the amount of negative press that the former Massachusetts Governor has courted in recent months, particularly after a series of gaffes, it was hardly a surprise that he also used his time at the podium to take a swipe at the media: “My job is to lay out a positive vision for the future of the country, and [the press’] job is to make sure no one else finds out about it.”

More In: International | News