“Tim Pawlenty’s not here, but he’s hit the campaign trail hard,” Mr. Obama said. “And to be honest, I think the American people are going to have some tough questions for Tim. Specifically, ‘Who are you, and where do you come from?’ Which is OK. Two years into my presidency and I’m still getting those questions.”

Indiana Gov. Mitch Daniels, the main Republican speaker, needled the president by recalling one of Mr. Obama’s private musings to fundraisers during the 2008 campaign that conservatives found refuge in religion and guns. Mr. Daniels, his right arm in a sling because of rotator cuff surgery, quipped: “Mr. President, until I get this thing off, I can cling to my gun or my Bible, but not both.”

Later he turned to Mr. Obama and mockingly took a shot at the president’s penchant for assistance during his speeches: “Mr. President you’re not laughing. Who forgot to put ha-ha-ha on the teleprompter?”

Health and Human Services Secretary Kathleen Sebelius, the Democratic speaker and Mr. Obama’s point person on health care, fired back at Mr. Daniels.

“We’re both Midwestern governors, we’ve both been Cabinet secretaries, and neither of us is going to be president in 2012,” the former Kansas governor joked.

The event brought journalists and public figures together for a night of skits that lampoon the capital’s personalities and issues of the day.

This is the 126th dinner for the Gridiron, Washington’s oldest and most exclusive organization for journalists. Its motto is “Singe but never burn.” Mr. Obama is the 21st president to attend the Gridiron. Every president since the club was founded in 1885 has addressed it, except for Grover Cleveland.

The event is on the record, but the club does not permit television coverage.

This year’s dinner honored long-time Gridiron member David Broder, a columnist for The Washington Post who died Wednesday.