Comedian Sarah Silverman has apologised to Paris Hilton for jokes she made in 2007 when the socialite was preparing for a spell behind bars.

Silverman hosted the MTV Movie Awards, which Hilton attended hours before going to prison for violating her parole in an alcohol-related reckless driving case.

The comic made crude jokes about how the reality TV star would spend her time locked up.

Sarah Silverman
Sarah Silverman has apologised to Paris Hilton for jokes she made about the socialite in 2007 (Ian West/PA)

Speaking on her podcast this week, Hilton, 40, told how Silverman’s monologue left her devastated and fighting back tears while seated in the star-studded audience.

“I was sitting there wanting to die,” Hilton, who spent three weeks in prison in June 2007, said. “I was trying to hold back my tears so hard. I had tears welling in my eyes, I wanted to run out of the entire room, but I just was trying to be strong and sit there, and the whole audience is laughing and she would not stop. It was so painful.”

On her own podcast, Silverman, 50, described her jokes as “hardcore” and admitted she would not tell them today.

The Wreck-It Ralph star said she did not realise Hilton was in the audience at the Universal Amphitheatre in Universal City, California, and when she saw her immediately regretted the routine.

Paris Hilton
Paris Hilton said she was left devastated after Sarah Silverman joked about her impending spell behind bars in 2007 (Ian West/PA)

She said: “The crowd went bananas and while I was thrilled at the success of my monologue, I remember spotting her in the audience. I really do. And I remember seeing that look on her face and my heart sank. Because there was a person under there.”

Silverman said “a couple of days later” she wrote Hilton a letter of apology and was saddened when Hilton said on her podcast she did not receive it.

She added: “I regretted the jokes not years later but kind of immediately.

“So here I am, 14 years later, telling you Paris that I am really sorry. I was then and I am much more completely and with far more understanding now.

“I can’t imagine what you were going through at the time.

“So Paris, I hope you accept my apology and I hope that you feel my remorse. I felt it the second I saw your face that night. It feels terrible to know you have hurt someone and it’s important to make it right. So I hope this does that.”

Hilton responded to Silverman’s apology in an impromptu podcast released on Friday.

She said she was “shocked” and “pleasantly surprised” to hear from the comedian.

She added: “She was so genuine and so sweet and it really moved me. I felt emotional hearing it and I could tell she really did mean what she said when she was apologising.

“Thank you, I really, really appreciate you doing that.”