By Amanda Becker and Emily Stephenson

NEW YORK (Reuters) - U.S. presidential campaign tensions seeped into a high-profile charity dinner on Thursday as Donald Trump joked about sending Hillary Clinton to prison and she alluded to Trump’s statements about women by estimating how he might rate the Statue of Liberty's attractiveness a four, maybe a five.

The candidates shared the stage at a formal dinner in New York City named for the state's former governor, Alfred E. Smith, less than 24 hours after finishing their third and final presidential debate in Las Vegas on Wednesday.

The annual event, which raises money for needy children, typically offers presidential hopefuls a respite from the tension of the campaign trail. But Trump and Clinton opted to instead trade sharpened barbs that reflected the acrimony of the 2016 White House campaign.

Trump spoke first and set the room on edge with bitter jabs at his rival, with his label of Clinton as “corrupt” drawing boos.

"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 to each other," Trump said. "In fact just before taking the dais, Hillary accidentally bumped into me and she very civilly said, 'Pardon me.'"

"And I very politely replied, 'Let me talk to you about that after I get into office,'" said Trump, a Republican whose supporters chant "lock her up" at rallies.

Clinton, whose remarks elicited both polite applause and derision, riffed off Trump's derogatory remarks about women's appearances, such as joking in a 2002 radio interview that they become less attractive after age 35.

"Donald looks at the Statue of Liberty and sees a four, maybe a five if she loses the torch and tablet and changes her hair," Clinton said of the New York City landmark.

"Come to think of it, you know what would be a good number for a woman? 45," Clinton said. The president elected on Nov. 8 will be the 45th in U.S. history.

Story continues

Trump and Clinton sat just a seat apart on the dais, separated by Cardinal Timothy Dolan, the archbishop of New York. At the event’s conclusion, they shook hands – a gesture they avoided at Wednesday’s debate.

But the tone of both candidates’ remarks was a departure from the past, when political figures and presidential candidates have stuck to a largely self-deprecating and good-natured brand of humor.

At one point at the event, which raised $6 million for Catholic charities supporting children, Trump said Clinton was “pretending not to hate Catholics.”

Trump was referring to the apparently hacked personal emails of Clinton campaign chairman John Podesta, published by Wikileaks, which show Clinton staffers criticizing high-profile figures for embracing Catholicism as the most “politically acceptable” of socially conservative religions.

Alfred Smith IV, the evening's host, perhaps best reflected the tension in the room, and the campaign, in his introductory remarks: "This has been a campaign for the history books," he said. "It has also been a campaign for the psychiatry books."

(Reporting by Emily Stephenson and Amanda Becker; Editing by Michael Perry)