ITV News US Correspondent Emma Murphy reports on Bill Cosby's overturned conviction
The court said on Wednesday that it found an agreement with a previous prosecutor prevented him from being charged in the case.
The 83-year-old comedian, who was once beloved as “America’s Dad”, was convicted in 2018 of drugging and molesting Andrea Constand, a Temple University employee at his suburban estate.
He has spent more than two years of a three-to-10-year sentence at a state prison near Philadelphia.
ITV News US Correspondent Emma Murphy explains why Pennsylvania's Supreme Court declared Bill Cosby's conviction unsafe
Crosby was charged in late 2015 when a prosecutor with new evidence arrested him days before the 12-year statute of limitations expired.
The trial judge initially allowed just one other accuser to testify at Cosby’s trial.
But after the jury deadlocked, he allowed five other accusers to testify at a second trial about their experiences with Cosby in the 1980s.
Bill Cosby arrives home in Elkins Park, Pennsylvania, on Wednesday afternoon, shortly after his release from prison
The Pennsylvania Supreme Court said that testimony tainted the trial. But the law on prior bad act testimony varies by state.
Prosecutors have not said if they will appeal or seek to try Cosby for a third time.
Cosby's lawyer Jennifer Bonjean says the comedian's conviction was 'fundamentally unfair'
Cosby's lawyer Jennifer Bonjean, said: "My reaction to the ruling is I am thrilled and I am pleased that the Pennsylvania Supreme Court saw what we knew all along, which was that Mr Cosby never should have been prosecuted for this for this case.
"He relied on representations of a prior district attorney and he relied on them to his detriment. And then the current district attorney not only reneged on that promise, but then used his own words against him.
"It is was fundamentally unfair. It was driven by politics. And that's how we got here today.
"And we're quite pleased that the Pennsylvania Supreme Court seems impervious to what is going on on the outside world and all of that pressure that was placed on the criminal justice system from hashtag movements and other and other media, not just not just social media, but mainstream media, frankly."
In May, Cosby was denied paroled after refusing to participate in sex offender programs.
He has said he would resist treatment programs and refuse to acknowledge wrongdoing even if it means serving the full 10-year sentence.
This is the first year he was eligible for parole.
Cosby's spokesperson Andrew Wyatt called the parole board decision “appalling.”
Cosby had invited Constand, a former professional basketball player who worked at his alma mater, to his estate in Pennsylvania the night she said he drugged and sexually assaulted her. Constand went to police a year later.
His other accusers knew the comedian through the entertainment industry and did not go to police.