This post deals with sexual assault and might be triggering for some readers.
Bill Cosby has walked free from prison less than two hours after Pennsylvania's highest court overturned his sexual assault conviction.
The state's Supreme Court ruled he never should have faced charges because he struck a non-prosecution deal with a previous district attorney more than 15 years ago.
He had served more than two years of a three-to-10-year sentence following his 2018 conviction.
Cosby, 83, was released from a state prison in Skippack, Pennsylvania, just before 2.30pm local time, a corrections department spokesperson said.
He was seen driving away in a white SUV.
The overturned conviction.
Cosby was found guilty of drugging and molesting Andrea Constand, an employee at his alma mater Temple University, in his home in 2004.
Montgomery County District Attorney Kevin Steele, who filed the charges against Cosby in 2015, issued a statement noting that a jury found Cosby guilty and that Wednesday's decision was not based on the facts of the case.
"My hope is that this decision will not dampen the reporting of sexual assaults by victims," he said.
"We still believe that no one is above the law - including those who are rich, famous and powerful."
The Supreme Court's majority found that a state prosecutor, Bruce Castor, made a deal with Cosby's attorneys in 2005 not to bring criminal charges relating to Constand.
As a result, Cosby was unable to avoid testifying as part of a civil lawsuit that Constand brought against him, since defendants can only refuse to testify when faced with criminal prosecution.
In a sworn deposition, Cosby acknowledged giving women sedatives to facilitate sexual encounters, although he maintained they were consensual.
His admission, which a judge later unsealed in 2015, helped form the basis for criminal charges later that year, when Steele charged Cosby days before the statute of limitations was set to expire.
The prosecution, the Pennsylvania Supreme Court found, essentially amounted to reneging on Castor's earlier promise not to charge Cosby, violating his due process rights.
"There is only one remedy that can completely restore Cosby to the status quo ante," Justice David Wecht wrote for a four-judge majority.
"He must be discharged and any future prosecution on these particular charges must be barred."