It was tense even before they started. Reporters tweeted that Hillary Clinton and Donald Trump entered the Alfred E. Smith Memorial Foundation Dinner from separate sides of the room, and didn't even shake hands (which at this point really isn't a surprise).

But there was hope that Thursday night's event could serve as a comedic salve for the nation following three decidedly nasty presidential debates. The fundraising event for Catholic charities — now in its 71st year — traditionally is a time for the candidates to offer jokes about themselves and their opponent.

Trump spoke first, and it was hard at times to tell if he was joking. Trump complained about all the politicians who loved him, his money and his endorsements beforehe decided to run for president. "Suddenly, [they] decided when I ran for president as a Republican that I've always been a no-good, rotten, disgusting scoundrel. And they totally forgot about me." And he continued, to silence from the crowd, "but that's OK."

Some of Trump's jokes resonated, such as his crack about Clinton's ongoing email server saga. "And even tonight, with all of the heated back and forth between my opponent and me at the debate last night, we have proven that we can actually be civil with each other. In fact, just before taking the dais, Hillary accidentally bumped into me, and she very civilly said, 'Pardon me.' "

It was a direct reference to the FBI's decision to not charge Clinton over her use of a private email server — and Trump's claims that he'd prosecute her over the matter if he becomes president. He continued, "And I very politely replied, 'Let me talk to you about that after I get into office.' "

Trump also joked about calling Hillary Clinton a "nasty woman" at their final debate Wednesday in Las Vegas. "But this stuff is all relative," he said. "After listening to Hillary rattle on and on and on, I don't think so badly of Rosie O'Donnell anymore," another famous woman he's previously disparaged.

The Republican nominee even scored laughter at the expense of his wife, Melania, who drew sharp criticism after she plagiarized portions of a Michelle Obama speech in her 2016 address to the Republican National Convention. "Michelle Obama gives a speech and everyone loves it, it's fantastic," Trump said. "They think she's absolutely great. My wife, Melania, gives the exact same speech, and people get on her case!"

But then things went south. Trump called Clinton corrupt several times, and not in a joking kind of way. "Hillary believes that it's vital to deceive the people by having one public policy and a totally different policy in private." That remark drew boos.

And there were even more boos when Trump alluded to recent emails dumped by WikiLeaks showing Clinton staffers disparaging conservative Catholics. "Here she is tonight, in public, pretending not to hate Catholics."

Clinton, as she's known to do, smiled throughout. But when it was her turn she also let her opponent have it, ribbing him over his recent allegations that the election might be rigged, and that he may not accept the results of the vote. "It's amazing I'm up here after Donald," Clinton said. "I didn't think he'd be OK with a peaceful transition of power."

She mocked Trump for talking over her during the debates. She mocked Trump's running mate, Indiana Gov. Mike Pence, for defending Trump to no end, saying she'd enjoy listening to Trump's VP pick denying Trump ever gave his Al Smith Dinner speech. She mocked Trump on the way he talks about women's looks, saying he'd rank the Statue of Liberty "a four, maybe a five if she loses the torch and tablet and changes her hair."

The Clinton line that drew the most laughs might have been her take on Trump's debate performance and the drama he provided before it even started. "Sharing a stage with Donald Trump is like, well, nothing really comes to mind," Clinton said. "Donald wanted me drug tested before last night's debate. ... I am so flattered that Donald thought I used some sort of performance enhancer. Now, actually, I did. It's called preparation."

After pausing for laughter, Clinton added, "And looking back, I've had to listen to Donald for three full debates, and he says I don't have any stamina!"

One needed much stamina to endure the night's sometimes cringe-worthy moments. Though Trump provided almost all of them, Clinton's more traditional speech couldn't lift the awkward mood of the event. If the Al Smith Dinner in previous years has served as a respite from bitter campaign seasons, this year it may have failed to do so.

There was at least one bright spot, though. Before the event was done, Clinton and Trump did shake hands. The development was announced from the stage, to applause.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.

STEVE INSKEEP, HOST:

Now let's listen to the Al Smith dinner. A few weeks before Election Day, politicians attend a white-tie fundraiser for Catholic charities in New York. In presidential election years, the presidential candidates turn up. They make a few edgy, but usually self-deprecating remarks - that's what normally happens. NPR's Sam Sanders reports on what happened last night.

SAM SANDERS, BYLINE: Donald Trump spoke before Clinton, and some of his jokes went over well.

(SOUNDBITE OF ARCHIVED RECORDING)

DONALD TRUMP: Oh, this one's going to get me in trouble.

SANDERS: With his wife - Trump joked about Melania Trump's speech at the Republican National Convention. Some parts of it were lifted from a speech given by the current first lady.

SANDERS: But about halfway through, Trump lost the room and began to draw boos.

(SOUNDBITE OF ARCHIVED RECORDING)

TRUMP: Hillary believes that it's vital to deceive the people by having one public policy...

UNIDENTIFIED PEOPLE: (Booing).

TRUMP: ...And a totally different policy in private.

SANDERS: And then there were more boos after Trump alluded to leaked emails showing Clinton staffers disparaging conservative Catholics.

(SOUNDBITE OF ARCHIVED RECORDING)

TRUMP: Here she is tonight, in public, pretending not to hate Catholics.

UNIDENTIFIED PEOPLE: (Booing).

SANDERS: Hillary Clinton smiled throughout, and when it was her turn, she hit her opponent pretty hard as well.

(SOUNDBITE OF ARCHIVED RECORDING)

HILLARY CLINTON: It's amazing I'm up here after Donald. I didn't think he'd be OK with a peaceful transition of power.

(LAUGHTER)

SANDERS: Clinton joked that Trump would grade the Statue of Liberty on its looks, rating her a four.

(SOUNDBITE OF ARCHIVED RECORDING)

CLINTON: Maybe a five if she loses the torch and tablet and changes her hair.

SANDERS: The room seemed to be more receptive of Clinton's zingers than Trump's, even when she compared Trump's health to the health of Vladimir Putin's horse - and even when she joked about the debate.

(SOUNDBITE OF ARCHIVED RECORDING)

CLINTON: Donald wanted me drug tested before last night's debate.

(LAUGHTER)

CLINTON: And look, I've got to tell you, I am so flattered that Donald thought I used some sort of performance enhancer.

(LAUGHTER)

CLINTON: Now, actually, I did. It's called preparation.

SANDERS: The dinner had one feature that this week's debate did not. Clinton and Trump actually shook hands last night. And when the emcee announced this to the crowd, there was applause.