Barack Obama and Mitt Romney both took swipes at the media during their stand-up routines at the Al Smith Dinner in New York on Thursday night.

Several boldfaced names attended the dinner, which always features dueling comedy appearances by the presidential candidates during an election year. Katie Couric, Chris Matthews, Fox News chief Roger Ailes and CNBC's Maria Bartiromo all sat just behind Obama and Romney.

Obama saved a special zinger for Matthews, whose operatically despairing rant about the president's first debate performance has become the stuff of legend.

"I particularly want to apologize to Chris Matthews," he said. "Four years ago, I gave him a thrill up his leg; this time around, I gave him a stroke."

Romney poked fun at the idea of liberal media bias in his monologue:

Of course rules of fairness have to be enforced, because what other safeguard do we have, besides the press?

Now I never suggest that the press is biased. I recognize that they have their job to do, and I have my job to do. My job is to lay out a positive vision for the future of the country, and their job is to make sure no one else finds out about it.

Let's just say that some in the media have a certain way of looking at things. When suddenly I pulled ahead in some of the major polls, what was the headline? "Polls Show Obama Leading from Behind."

And I've already seen early reports from tonight's dinner, headline; "Obama Embraced by Catholics. Romney Dines with Rich People."

Watch the Obama video above, and the Romney video below:

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

Also on HuffPost:

Loading Slideshow...
  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L), Cardinal Timothy Dolan (C), Archbishop of New York, and Republican presidential candidate Mitt Romney (R) attend the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L), Cardinal Timothy Dolan (2L), Archbishop of New York, Mitt Romney (2R) Ann Romney and others attend the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L), Cardinal Timothy Dolan (C), Archbishop of New York, and Republican presidential candidate Mitt Romney (R) during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L), Cardinal Timothy Dolan (2nd-L), Archbishop of New York, Republican presidential candidate Mitt Romney (2nd-R) with wife Ann Romney (R) attend the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US presidential candidate Mitt Romney speaks during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US presidential candidate Mitt Romney (L) speaks during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama (L), Cardinal Timothy Dolan (2L), Archbishop of New York, Republican presidential candidate Mitt Romney (2R), Ann Romney (R) and others attend the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US presidential candidate Mitt Romney speaks during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama and others listen as Republican US Presidential Candidate Mitt Romney speaks during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US Presidential Candidate Mitt Romney and US President Barack Obama shake hands during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US presidential candidate Mitt Romney and others listen as US President Barack Obama speaks during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO/Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • US-VOTE2012

    US Republican presidential candidate Mitt Romney and US President Barack Obama attend the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (L) and Republican presidential candidate Mitt Romney (R) share a laugh at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • US-VOTE2012

    US President Barack Obama addresses a speech while attending with US Republican presidential candidate Mitt Romney, the Alfred E. Smith Memorial Foundation Program at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: (L - R) U.S. President Barack Obama, Roman Catholic Cardinal and Archbishop of New York Timothy Dolan, and Republican presidential candidate Mitt Romney share a laugh at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: Republican presidential candidate Mitt Romney (L) speaks as U.S. President Barack Obama (R) and Alfred E. Smith IV (C) laugh at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: Republican presidential candidate Mitt Romney (R) shakes hands with U.S. President Barack Obama at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • US-VOTE2012

    People attend the Alfred E. Smith Memorial Foundation Program featuring appearances by US President Barack Obama and US Republican presidential candidate Mitt Romney at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (R) and Republican presidential candidate Mitt Romney (L) attend the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (L), Roman Catholic Cardinal and Archbishop of New York Timothy Dolan (R) and Republican presidential candidate Mitt Romney (C) attend the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (L) and Republican presidential candidate Mitt Romney (C) shake hands at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    Republican US presidential candidate Mitt Romney and US President Barack Obama shake hands during the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO / Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • US-VOTE2012

    People attend the Alfred E. Smith Memorial Foundation Program featuring appearances by US President Barack Obama and US Republican presidential candidate Mitt Romney at the Waldorf Astoria hotel in New York, October 18, 2012. AFP PHOTO/Emmanuel DUNAND (Photo credit should read EMMANUEL DUNAND/AFP/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (L), Roman Catholic Cardinal and Archbishop of New York Timothy Dolan (C), Republican presidential candidate Mitt Romney (2nd R) and Ann Romney (R) attend the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • US-VOTE-2012-DEMOCRATIC CAMPAIGN

    US President Barack Obama, Republican US presidential candidate Mitt Romney and others attend the 67th annual Al Smith dinner at the Waldorf Astoria hotel October 18, 2012 in New York, New York. AFP PHOTO / Brendan SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: Republican presidential candidate Mitt Romney (L) speaks as U.S. President Barack Obama (R) and Alfred E. Smith IV (C) laugh at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (R) and Republican presidential candidate Mitt Romney share a laugh at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: (L - R) U.S. President Barack Obama, Roman Catholic Cardinal and Archbishop of New York Timothy Dolan, and Republican presidential candidate Mitt Romney attend the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • Barack Obama And Mitt Romney Address Alfred E. Smith Memorial Foundation Dinner

    NEW YORK, NY - OCTOBER 18: U.S. President Barack Obama (2nd L) and Republican presidential candidate Mitt Romney (L) share a laugh as Ann Romney (R) looks on at the 67th Annual Alfred E. Smith Memorial Foundation Dinner at the Waldorf-Astoria Hotel on October 18, 2012 in New York City. The lighthearted white-tie charity gala has long been a tradition of the presidential race. (Photo by Mario Tama/Getty Images)

  • MItt Romney, Barack Obama

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama greet each other as they attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. Also pictured are Cardinal Timothy Dolan, second left, and Ann Romney, right. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. Also pictured are Cardinal Timothy Dolan, second left, and Ann Romney, right. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama, left, attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. Also pictured are Cardinal Timothy Dolan, second left, and Ann Romney, second right. (AP Photo/Charles Dharapak)

  • Barack Obama, Mitt Romney, Ann Romney

    President Barack Obama and Republican presidential candidate, former Massachusetts Gov. Mitt Romney, greet each other as they arrive at the Archdiocese of New York's 67th Annual Alfred. E. Smith Memorial Foundation Dinner, Thursday, Oct. 18, 2012, at the Waldorf Astoria Hotel in New York. At right is Ann Romney. The Alfred E. Smith Memorial Foundation Dinner, a white-tie gala has been a required stop for politicians since the end of World War II. In keeping with tradition, candidates prepare humorous fare for the fundraising event organized by the Catholic Archdiocese of New York for the benefit of needy children. (AP Photo/Carolyn Kaster)

  • Barack Obama, Ann Romney

    President Barack Obama is greeted by dinner attendees including Ann Romney, second from left, as he arrives at the Archdiocese of New York's 67th Annual Alfred. E. Smith Memorial Foundation Dinner, Thursday, Oct. 18, 2012, at the Waldorf Astoria Hotel in New York. The Alfred E. Smith Memorial Foundation Dinner, a white-tie gala has been a required stop for politicians since the end of World War II. In keeping with tradition, candidates prepare humorous fare for the fundraising event organized by the Catholic Archdiocese of New York for the benefit of needy children. (AP Photo/Carolyn Kaster)

  • MItt Romney, Barack Obama

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. (AP Photo/Charles Dharapak)

  • Barack Obama, Mitt Romney, Ann Romney, Timothy Dolan

    From left, President Barack Obama, Cardinal Timothy Dolan, Republican presidential candidate, former Massachusetts Gov. Mitt Romney, and his wife Ann Romney attend the Archdiocese of New York's 67th Annual Alfred. E. Smith Memorial Foundation Dinner, Thursday, Oct. 18, 2012, at the Waldorf Astoria Hotel in New York. (AP Photo/Carolyn Kaster)

  • Barack Obama, Mitt Romney

    President Barack Obama, left, and Republican presidential candidate, former Massachusetts Gov. Mitt Romney, right, stand during the prayer with Cardinal Timothy Dolan during the Archdiocese of New York's 67th Annual Alfred. E. Smith Memorial Foundation Dinner, Thursday, Oct. 18, 2012, at the Waldorf Astoria Hotel in New York. (AP Photo/Carolyn Kaster)

  • Barack Obama, Mitt Romney

    President Barack Obama arrives at The Archdiocese of New York's 67th Annual Alfred. E. Smith Memorial Foundation Dinner, Thursday, Oct. 18, 2012, at the Waldorf Astoria Hotel in New York. The Alfred E. Smith Memorial Foundation Dinner, a white-tie gala has been a required stop for politicians since the end of World War II. In keeping with tradition, candidates prepare humorous fare for the fundraising event organized by the Catholic Archdiocese of New York for the benefit of needy children. (AP Photo/Carolyn Kaster)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. Also pictured are Cardinal Timothy Dolan, second left, and Ann Romney, right. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama bow their heads in prayer as they attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. Also pictured are Cardinal Timothy Dolan, second left, and Ann Romney, second right. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan

    Republican presidential candidate and former Massachusetts Gov. Mitt Romney and President Barack Obama stand with Cardinal Timothy Dolan as they bow their heads in prayer as they attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. (AP Photo/Charles Dharapak)

  • MItt Romney, Barack Obama, Timothy Dolan, Ann Romney

    President Barack Obama, left, talks with Cardinal Timothy Dolan, second left, as Republican presidential candidate and former Massachusetts Gov. Mitt Romney and Ann Romney are seated at right as they attend the 67th annual Alfred E. Smith Memorial Foundation Dinner, a charity gala organized by the Archdiocese of New York, Thursday, Oct. 18, 2012, at the Waldorf Astoria hotel in New York. (AP Photo/Charles Dharapak)