Following the US court’s revoking of Bill Cosby‘s conviction for drugging and sexually assaulting a woman 15 years ago, the American comedian was freed from prison on Wednesday, in a blow to the #MeToo movement.

The 83-year-old left SCI Phoenix, a state correctional facility in northwest of Philadelphia, according to AFP inputs.

His release came shortly after the Pennsylvania Supreme Court ruled that Cosby had been denied a fair trial in 2018 when he was convicted of assaulting Andrea Constand at his Philadelphia mansion in 2004.

“Cosby’s convictions and judgment of sentence are vacated, and he is discharged,” the judges wrote in a 79-page ruling.

Also Read: Saw full family die off: Wrongfully convicted man freed after 32 years

Cosby shattered racial barriers with his Emmy-winning role on “I Spy” in the 1960s, and then as a dad and doctor on the hit TV series “The Cosby Show” two decades later.

But he suffered a fall from grace as allegations of sexual misconduct emerged against him.

His conviction was the first guilty verdict for sexual assault against a celebrity since the advent of the worldwide reckoning against sexual violence and abuse of power dubbed the #MeToo movement.

Cosby served more than two years of a three-to-ten-year sentence for aggravated indecent assault and has always maintained his innocence.

Cosby’s publicist did not immediately respond to request for comment from AFP.

Although more than 60 women charged that they had been victims of sexual assault by Cosby, he was tried criminally only for Constand’s assault, since the statute of limitations had expired in the other cases.

Cosby has insisted that the encounter with Constand, who was then a Temple University employee, was consensual.

He filed his second appeal against his conviction in August last year.

His lawyers argued that five women should not have been allowed to give evidence at his trial as witnesses.

They complained that their “decades-old” allegations, which were not part of the charges, had prejudiced the jury.

The prosecutors had put them on the stand to convince the jury that Cosby had displayed a pattern of drugging and assaulting women.

The attorneys also argued it was “fundamentally unfair” that deposition testimony Cosby gave in a civil case regarding his use of sedative drugs and his sexual behaviours in the 1970s was heard in court.

He had admitted giving Quaaludes, a now-banned party drug, to women with a view to having sex with them.

They argued that Cosby believed the testimony was immune from prosecution when he gave it but the acknowledgement formed a key part of his trial.

The judges agreed that the “non-prosecution agreement” meant he should not have been charged.

“He must be discharged, and any future prosecution on these particular charges must be barred,” three justices wrote.

Also Read: ‘That ’70s Show’ actor Danny Masterson to face trial on rape charges

“We do not dispute that this remedy is both severe and rare. But it is warranted here, indeed compelled,” they added.

White House Press Secretary Jen Psaki said President Joe Biden did not have “a direct response” to the ruling but added he had “long been an advocate for fighting against violence against women.”

Cosby had lost an earlier appeal when a court ruled that the prosecution’s evidence had established Cosby’s “unique sexual assault playbook.”

A first prosecution against Cosby ended in mistrial in June 2017 after the jury was unable to reach a unanimous verdict.

A dozen women who say they were victims of Cosby have filed civil suits against the actor seeking compensation for damages.