In a surprise ruling, the Pennsylvania Supreme Court overturned Bill Cosby’s 2018 sexual assault conviction and barred a retrial in the case. Cosby was convicted of drugging and assaulting Temple University employee Andrea Constand in 2004.

The Supreme Court ordered Cosby, 83, to be released after serving more than two years in a state prison near Philadelphia. The comedian had been sentenced to serve three to 10 years behind bars.

» READ MORE: Bill Cosby’s conviction overturned by Pa. Supreme Court

“It’s a dark day in the history of American law,” said CNN legal analyst and former deputy assistant attorney general Elliot Williams, who noted that the conviction was overturned due to legal technicalities. “The challenge here is there was never a question as to Bill Cosby’s guilt.”

Cosby spokesman Andrew Wyatt praised the Supreme Court’s decision, and said the comedian’s legal team had been arguing that Cosby’s rights were violated after then-Montgomery County District Attorney Bruce L. Castor Jr. declined to file charges in this case. Instead, Castor struck a non-prosecution deal with Cosby to compel him to testify in a civil suit.

“He was given a deal. He had immunity. He settled out of court thinking he wasn’t settling and waiving his Fifth Amendment rights to his detriment,” Wyatt told TMZ. “That’s what we’ve been saying all along.”

Sixty women have accused Cosby of rape, sexual assault, or some other form of sexual misconduct.

Celebrities, media figures, and accusers across the country quickly came forward to react to the ruling.

Janice Baker Kinney, one of five women to testify at Cosby’s trial, said she was shocked by the ruling. Kinney accused Cosby of drugging her in the early 1980s and sexually assaulting her while she was passed out.

“It’s going to take me a little while for this to set in and realize what’s happening just because I’m just stunned,” Baker-Kinney told the Inquirer. ”I’m sick to my stomach thinking about seeing him walk out with that holier than thou, ‘you can’t touch me I’m Bill Cosby’ look.”

“I am completely out of breath,” accuser Eden Tirl told NBC News correspondent Kate Snow, saying that strict statute of limitations rules limited the impact of women who came forward against Cosby.

“The outdated laws are so clearly in place, protecting men in these cases, more often than not,” Tirl said via text, according to Snow. “This is the story of the MeToo movement that must be included in the narrative now and not pushing the Cosby story off to the side.”

“THIS is why women do not come forward,” wrote E. Jean Carroll, the well-known advice columnist for Elle magazine who is suing former President Donald Trump for defamation after accusing him of sexually assaulting her in the 1990s.

“Welp… I sure didn’t have a court negating 50-something sexual assault allegations and freeing Bill Cosby on my Armageddon Bingo card,” wrote MSNBC host Joy Reid.

» READ MORE: Read the Pa. Supreme Court’s opinion in the Bill Cosby trial

“WHEN will things get better for women and girls regarding sexual assault, sexism, misogyny and ageism?” comedian Kathy Griffin asked. “What will it take? So discouraged.”

“We live in a world where Britney Spears has people controlling her uterus, but Bill Cosby is free. Got it,” wrote producer and screenwriter Randi Mayem Singer.

Cosby did have at least one prominent supporter cheering the decision — actress Phylicia Rashad, who played his wife on The Cosby Show and who was recently named the dean of Howard University’s College of Fine Arts.

“FINALLY!!!! A terrible wrong is being righted- a miscarriage of justice is corrected!” Rashad wrote on Twitter.

» READ MORE: These were the issues Bill Cosby raised to appeal his sex-assault conviction

Rashad later added to her initial comments with another tweet, saying, “I fully support survivors of sexual assault coming forward. My post was in no way intended to be insensitive to their truth. Personally, I know from friends and family that such abuse has lifelong residual effects. My heartfelt wish is for healing.”

Staff writer Laura McCrystal contributed to this article.