Comedian Bill Cosby has walked free from jail after a higher court overturned his rape conviction.
The Pennsylvania Supreme Court ruled there were issues in the process that led Cosby to be found guilty of drugging and abusing sports administrator Andrea Constand.
The court pointed to the fact that a prosecutor who initially handled the case in 2005 had made a deal with Cosby’s lawyers that he would not be charged.
“In light of these circumstances, the subsequent decision by successor DAs [District Attorneys] to prosecute Cosby violated Cosby’s due process rights,” the judges wrote.
The 83-year-old Cosby – once beloved as “America’s dad” – was sentenced in 2018 after being found guilty of drugging and molesting Ms Constand at his suburban estate in 2004.
Other women who testified as prosecution witnesses had also alleged they had been assaulted after being given drugs that rendered them motionless.
Cosby has served more than two years of a three- to 10-year sentence at a state prison near Philadelphia.
He had vowed to serve all 10 years rather than acknowledge any remorse about the 2004 encounter.
On Thursday morning (Australian time) after Cosby was allowed to leave a prison near Philadelphia, his attorney Brian Perry told CNN the comedian and his legal team were headed to his Pennsylvania home to “celebrate”.
“I want to thank the Supreme Court who saw the light and saw the truth,” Cosby’s family said in a statement.
Cosby was charged in late 2015, when a prosecutor armed with newly unsealed evidence – Cosby’s damaging deposition from Ms Constand’s lawsuit – arrested him days before the 12-year statute of limitations expired.
The judge allowed just one other accuser to testify at Cosby’s first trial, when the jury deadlocked.
However, at the retrial, he allowed five other accusers to testify about their experiences with Cosby in the 1980s.
The Pennsylvania Supreme Court said that testimony tainted the trial, even though a lower appeals court had found it appropriate to show a signature pattern of drugging and molesting women.
Cosby was the first celebrity tried and convicted in the MeToo era, so the reversal could make prosecutors wary of calling other accusers in similar cases.
The law on prior bad act testimony varies by US state, though, and the ruling only holds sway in Pennsylvania.
Prosecutors did not immediately say if they would appeal or seek to try Cosby for a third time.
The justices voiced concern not just about sex assault cases but what they saw as the judiciary’s increasing tendency to allow testimony that crosses the line into character attacks.
The law allows the testimony only in limited cases, including to show a crime pattern so specific it serves to identify the perpetrator.