NEW YORK -- House Speaker Paul Ryan poked fun at himself, the Senate's top Democrat and even the Catholic church on Thursday night. But the top target of the speaker's ribbing, as he faced hundreds of New York's elite at a charity dinner that celebrates irreverence, was President Trump.

Ryan quickly reminded the audience that Mr. Trump offended some people when he addressed the same crowd the year before.

"Some said it was unbecoming of a public figure and they said that his comments were offensive. Well, thank God he's learned his lesson," Ryan deadpanned as he delivered the keynote address for the 72nd annual Alfred E. Smith Memorial Foundation Dinner, an event, according to the program, that encourages speakers to "poke fun at a political issue, an opponent, or themselves."

Get Breaking News Delivered to Your Inbox

Ryan later jabbed Mr. Trump's lack of accomplishments, the White House's ties to Wall Street and, of course, the president's overactive Twitter account. The event, hosted by New York Archbishop Cardinal Timothy Dolan, drew leaders of finance and politics to a hotel ballroom in Manhattan, where an estimated 815 guests in tuxedos and dinner gowns dined on lobster and black radish salad, tournedo of beef with lacinto kale and "berries of the forest" cake.

"I don't think I've seen this many New York liberals, this many Wall Street CEOs in one room since my last visit to the White House," Ryan chuckled as he turned his attention briefly to Senate Minority Leader Chuck Schumer. "I know why Chuck has been so hard on President Trump. It's not ideological; Chuck is just mad he lost his top donor."

Mr. Trump attended last year's Al Smith dinner as a featured speaker, and others before that as a prominent New York business leader who donated money to Democrats and Republicans alike.

Even with Ryan's light-hearted jabs, this year's affair was decidedly more cordial than last year's, when Mr. Trump and Democratic rival Hillary Clinton traded caustic barbs at the charity event meant to raise money for impoverished children. At the time, Mr. Trump drew boos when he said of Clinton, "Here she is tonight, in public, pretending not to hate Catholics."

This year, Mr. Trump was the star again, in absentia.

Ryan said he checks Twitter every morning "to see which tweets I will have to pretend that I didn't see later" - a not-so-subtle reference to the president's overactive social media account. He also addressed Mr. Trump's frequent complaint that he's not getting enough credit.

"The truth is, the press absolutely misunderstands and never records the big accomplishments of the White House," Ryan said. "Look at all the new jobs the president has created - just among the White House staff."