US comedian Bill Cosby has left prison hours after his sexual assault conviction was overturned by Pennsylvania’s Supreme Court.
The judges said there had been a “process violation” by the prosecution, but admitted their ruling was unusual.
Mr Cosby, 83, served more than two years of a three to 10-year sentence at a state prison near Philadelphia.
In 2018 he was found guilty of drugging and molesting ex-basketball player Andrea Constand.
Mr Cosby is best known for starring in the 1980s TV series The Cosby Show and was once known as “America’s Dad”.
Dozens of women have publicly accused Mr Cosby of sexual assault, but he was only tried criminally for the incident against Ms Constand. His conviction in 2018 was widely seen as a landmark moment in the #MeToo movement.
In a verdict issued, Pennsylvania’s highest court found there was a “process violation” because Mr Cosby’s lawyers had made an agreement with a previous state prosecutor that he would not be charged in the case.
The former actor appeared frail as he slowly walked to waiting media outside his home, shortly after being released from prison.
He did not say anything, instead leaning on his team of lawyers and spokesman Andrew Wyatt to answer questions.
“On this hot day – this is a hot verdict for us,” Mr Wyatt said.