BILL COSBY was freed from prison and returned home on Wednesday, less than two hours after Pennsylvania's highest court overturned his sexual assault conviction, saying he never should have faced charges after striking a non-prosecution deal with a previous district attorney more than 15 years ago.

The Pennsylvania Supreme Court issued its split decision after Cosby 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 Shippack, Pennsylvania, just before 2:30 p.m. (1830 GMT), a corrections department spokesperson said.

Around an hour later, he arrived at his stately stone mansion in Elkins Park, a Philadelphia suburb. Wearing a short-sleeved shirt, he climbed out of a white SUV and flashed a peace sign before walking into the house with the assistance of another man.

The comedian and actor is best known for his role as the lovable husband and father in the 1980s television comedy series "The Cosby Show," earning him the nickname "America's Dad."

But his family-friendly reputation was shattered after dozens of women accused him of sexual assault over a period of decades. His conviction was widely seen as a watershed moment in the #MeToo movement that brought forth an array of allegations against powerful men in Hollywood and beyond.

Cosby was found guilty of drugging and molesting Andrea Constand, an employee at his alma mater Temple University, in his home in 2004. Constand's allegations were the only ones against Cosby that were not too old to allow for criminal charges.

The court's decision expressly barred prosecutors from retrying Cosby.

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."

Reaction was swift, with many women involved in the #MeToo movement expressing horror at the decision.

"THIS is why women do not come forward," writer E. Jean Carroll, who has accused former President Donald Trump of raping her in the 1990s, wrote on Twitter. Trump has denied her claim.

Lisa Bloom, a lawyer who represented some of Cosby's accusers, told CNN she was "absolutely disgusted and shocked" by the decision.

But Phylicia Rashad, Cosby's co-star on "The Cosby Show," celebrated the ruling for correcting "a miscarriage of justice."

Cosby's spokesperson did not immediately respond to requests for comment.


'ONLY ONE REMEDY'

The court's majority found that a state prosecutor, Bruce Castor, made a deal with Cosby's attorneys in 2005 not to bring criminal charges.

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, though 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, who had just been elected district attorney, 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."

One dissenting justice said Cosby should stay in prison, while two others said prosecutors should be allowed to retry him without relying on the tainted evidence.

Castor made national headlines in February as a member of former President Donald Trump's legal defense team during Trump's impeachment trial in the U.S. Senate. The former prosecutor delivered a rambling opening statement that drew sharp criticism from several senators, including Republican supporters of Trump.

Cosby's first trial ended with a hung jury in 2017, when jurors could not reach a unanimous decision on his culpability. But he was found guilty at a second trial, after the judge, Steven O'Neill, allowed prosecutors to call five prior accusers - four more than in the first trial.

Armed with those witnesses, prosecutors argued that Cosby's assault of Constand was a well-rehearsed offense he had honed over decades: he befriended younger women, acting as a mentor, only to sexually assault them, often with the help of drugs.