NEW YORK — President Barack Obama and Republican challenger Mitt Romney poked gentle but sharp fun at one another Thursday night during an esteemed New York Catholic charity dinner that has long been a required stop for presidential candidates. Romney mocked his own wealth while taking aim at the president for running up the federal debt while Obama noted the "nice long nap" he had taken during the first presidential debate.

The two rivals donned tuxedos and white ties to share the dais at the Alfred E. Smith Memorial Foundation Dinner, an annual gala that has drawn political leaders and other notables since the end of World War II.

The event was a comedic pause in a contest that has drawn increasingly nasty and close with less than three weeks left before the Nov. 6 election. On Tuesday, Obama and Romney sparred in a nationally televised debate in which each questioned the other's character and truthfulness.

Romney spoke first at the dinner, which was set to raise $5 million for Catholic charities. Addressing the elegantly dressed crowd, Romney, a millionaire many times over, said "it's nice to finally relax and wear what Ann and I wear around the house." Of Obama, Romney said: "You have to wonder what he's thinking. So little time, so much to redistribute."

Obama followed, noting his soporific performance in the first debate but also chiding Romney for his wealth.

"Earlier today I went shopping at some stores in Midtown," Obama said. "I understand Gov. Romney went shopping for some stores in Midtown."

Obama noted that he was preparing for the final debate with Romney on Monday, which will focus on foreign policy.

"Spoiler alert: We got bin Laden," Obama said, referring to the military mission that killed the mastermind of the Sept. 11, 2001, terror attacks.

In a television interview earlier Thursday, Obama rejected criticism that his administration has offered a confused response to the attack on the U.S. Consulate in Libya, an accusation Romney has made repeatedly in the campaign for the White House. Of any breakdown that might have led to the killing of four Americans, Obama declared, "We're going to fix it."

Obama made the comments on "The Daily Show" on Comedy Central. Host Jon Stewart turned serious in pressing Obama over the government's changing explanation about the attacks in Benghazi. When Stewart suggested that even Obama would concede his administration's coordination and communication had not been "optimal," Obama said: "If four Americans get killed, it's not optimal. We're going to fix it. All of it."

Romney has pointedly questioned Obama's handling of the matter and his honesty about it to Americans. Those accusations led to the fiercest conflict of the presidential debate on Tuesday and will surely come to the fore again on Monday in the campaign's final debate.

Obama insisted information was shared with the American people as it came in. The attack is under investigation, Obama said, and "the picture eventually gets filled in."

The exchange came on a day when Vice President Joe Biden compared the policies of Romney's running mate, Rep. Paul Ryan of Wisconsin, to a gun pointed at Americans, and after Romney's son said he was tempted to "take a swing" at Obama when the Democrat questions the GOP candidate's honesty.

Ryan, speaking at a campaign stop in Ocala, Fla., before Biden made his comments in Nevada, accused Obama of sending a divisive message.

"He's basically trying to disqualify his opponent with a sea of negativity," Ryan said. "He's trying to divide this country, pitting people against each other. He's trying to win this election by default. You know what? We're not going to let him get away with that."

The sharpness of the barbs is a reflection of just how tight the race is 19 days out. Hard campaign decisions are being made, state by state.

Romney aides said Thursday that no staff had been dispatched to Michigan or Pennsylvania, where they once suggested he would compete aggressively but has not.

The bickering between campaigns eased briefly at the Smith dinner, named for the four-term Democratic governor of New York who lost the 1928 presidential race to Republican Herbert Hoover. Smith was the first Catholic to run for president and the dinner named for him is organized by the Catholic Archdiocese of New York for the benefit of needy children.

Democrats are pushing the accusation that Romney is being dishonest, taking up Obama's refrain since Tuesday's debate that the GOP nominee is offering "a sketchy deal."

"I don't think they were just sketchy," Biden said at a rally in Las Vegas. "I think they were Etch-a-Sketchy."

Obama and Biden are to campaign together next Tuesday in Ohio after Monday night's debate.

On Libya, Obama has faced scrutiny for shifting explanations of what happened. He pushed back on "The Daily Show."

"We weren't confused about the fact that four Americans had been killed," Obama said.

"I wasn't confused about the fact that we needed to ramp up diplomatic security. ... I wasn't confused about the fact that we had to investigate exactly happened so it gets fixed. And I wasn't confused about the fact that we're going to hunt down whoever did it and bring them to justice," the president said.

On another national security issue, Obama said he still wants to close the prison for terrorism suspects at Guantanamo Bay, Cuba, a big unmet promise of his 2008 campaign. The effort was blocked by Congress, which passed a law prohibiting the government from moving prisoners to the U.S. for detention or trial.

On the celebrity front, Obama picked up the endorsement of rock star Bruce Springsteen, who also backed the Democrat in 2008 and Thursday campaigned for him in Ohio with former President Bill Clinton.

"For 30 years I've been writing about the distance between the American dream and American reality," Springsteen said, reading from a statement on his music stand. "Our vote is the one principal way we get to determine that distance."

___

Associated Press writers Nedra Pickler and Ken Thomas in Washington, Thomas Beaumont in Norfolk, Va., and Tamara Lush in Ocala, Fla., contributed to this report.

Also on HuffPost:

Loading Slideshow...
  • George Clooney & President Obama

    Actor George Clooney leaves after he spoke to the media March 15, 2012 at the White House in Washington, DC. Clooney had meeting with President Barack Obama to discuss the current situations in Darfur, Sudan. (Photo by Alex Wong/Getty Images)

  • President Obama & Tyler Perry

    Actor and director Tyler Perry hugs US President Barack Obama during a campaign event at Tyler Perry Studios March 16, 2012 in Atlanta, Georgia. President Obama is spending the day traveling to Chicago, Illinois and Atlanta, Georgia to attend private and public campaign events. (Photo by BRENDAN SMIALOWSKI/AFP/Getty Images)

  • The Obamas & Oprah Winfrey

    US President Barack Obama and First Lady Michelle Obama chat with talk show host Oprah Winfrey during a taping of the Oprah Winfrey show April 27, 2011 at Harpo Studios in Chicago. (Photo by MANDEL NGAN/AFP/Getty Images)

  • President Obama & Magic Johnson

    In this handout image provided by the U.S. Navy, President Barack Obama is greeted on the court by NBA Hall of Fame basketball player Earvin 'Magic' Johnson and Michigan State University assistant coach Mike Garland. (Photo by Mass Communication Specialist 2nd Class James R. Evans/U.S. Navy via Getty Images)

  • Willow Smith Performs At The White House

    Willow Smith, daughter of Will Smith and Jada Pinkett Smitt, performs during the White House Easter Egg Roll on the South Lawn of the White House on April 25, 2011 in Washington, DC. (Photo by Roger L. Wollenberg-Pool/Getty Images)

  • Antonio Banderas & President Obama

    Antonio Banderas and his wife Melanie Griffith hosted a fundraising event for President Obama in October 2011. (Photo by Sean Gallup/Getty Images)

  • Tom Hanks Narrates Pro-Obama Film

    This 17-minute film released by President Obama's re-election campaign was directed by Davis Guggenheim (director of "An Inconvenient Truth") and narrated by actor Tom Hanks.

  • Gov. Mitt Romney & Jeff Foxworthy

    Republican presidential candidate, former Massachusetts Gov. Mitt Romney makes a campaign appearance with comedian Jeff Foxworthy at the Whistle Stop cafe March 12, 2012 in Mobile, Alabama. (Photo by Win McNamee/Getty Images)

  • Gov. Mitt Romney & Kid Rock

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney greets musician Kid Rock during a campaign rally at the Royal Oak Theatre on February 27, 2012 in Royal Oak, Michigan. (Photo by Justin Sullivan/Getty Images)

  • David Mustaine & Rick Santorum

    David Mustaine of Megadeth expressed support for Rick Santorum in a February <a href="http://www.musicradar.com/news/live/interview-megadeths-dave-mustaine-talks-guitar-politics-and-todays-music-529703" target="_hplink">interview with Music Radar</a>.

  • Kelly Clarkson & Ron Paul

    Kelly Clarkson tweeted about her love for Ron Paul in late 2011, but dialed it back slightly after a backlash accused her of supporting Paul's racist and homophobic publications, <a href="http://www.foxnews.com/entertainment/2012/03/09/kelly-clarkson-never-endorsed-ron-paul/" target="_hplink">reports Fox News</a>. (Photo by ROBYN BECK/AFP/Getty Images)

  • Snoop Dogg & Ron Paul

    In December 2011, Snoop Dogg posted a picture of Ron Paul on his Facebook page with the caption "Smoke Weed Every Day," <a href="http://www.reuters.com/article/2012/01/31/us-snoopdogg-ronpaul-idUSTRE80U04220120131" target="_hplink">reports Reuters</a>. (Photo by Ethan Miller/Getty Images for Keep Memory Alive)

  • Oliver Stone & Ron Paul

    In January, Oliver Stone told <a href="http://www.rockcellarmagazine.com/2012/01/12/director-oliver-stone-on-history-and-america-jim-morrison-ron-paul/" target="_hplink">Rock Cellar Magazine</a> that he would vote for Ron Paul over Barack Obama if Paul was named the GOP nominee because "he's the only one of anybody who's saying anything intelligent about the future of the world." (Photo by Stephen Morton/Getty Images)