On Wednesday, Bill Cosby‘s 2018 conviction for drugging and sexually assaulting Andrea Constand was overturned by the Pennsylvania Supreme Court, and the 83-year-old actor and comedian was released from prison.

The court found that an agreement Cosby had with a previous prosecutor prevented him from being charged in the case, according to documents obtained by ET. Cosby previously said that he relied on that agreement before agreeing to testify in his accuser’s civil lawsuit.

The court also ruled that Cosby’s case cannot be prosecuted again, writing, “He must be discharged, and any future prosecution on these particular charges must be barred.”

Following Cosby’s release, Montgomery Country District Attorney Kevin R. Steele said in a statement:

“The majority decision by the Pennsylvania Supreme Court orders the release of William H. Cosby Jr. from state prison. He was found guilty by a jury and now goes free on a procedural issue that is irrelevant to the facts of the crime. I want to commend Cosby’s victim Andrea Constand for her bravery in coming forward and remaining steadfast throughout this long ordeal, as well as all of the other women who have shared similar experiences. My hope is that this decision will not dampen the reporting of sexual assaults by victims. Prosecutors in my office will continue to follow the evidence wherever and to whomever, it leads. We still believe that no one is above the law—including those who are rich, famous and powerful.”

Cosby was initially charged in the case in 2015. He was acquitted during his first trial in 2017. The next year, during Cosby’s retrial, he was convicted of all three felony sex assault counts. Prior to his conviction being overturned, Cosby, who has maintained that his encounter with Constand was consensual, had served more than two years of his three to 10-year prison sentence.

Following the news, friends and fans of the former sitcom star took to social media to express their support for Cosby’s conviction being overturned.

“FINALLY!!!! A terrible wrong is being righted- a miscarriage of justice is corrected!” shared Phylicia Rashad, who played Cosby’s on-screen wife, Clair Huxtable, on “The Cosby Show”.

A few hours later, Rashad tweeted in support of sexual assault survivors: “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.”

Geraldo Rivera also offered his opinion on Twitter, writing, “Told you so on #BillCosby. He was convicted by a court so tainted by public opinion and social pressure that it allowed obviously prejudicial evidence and improper witnesses. He may be a bad guy, but in this case, he was railroaded by the mob.”

However, other celebs were not thrilled by the news.

“I know many young women and men who are so afraid to press charges against their rapist and Re traumatize themselves,” shared Rosanna Arquette in a series of tweets. “I am heartbroken today to hear of the news of Cosby’s release .this is sickening. My heart is with my sister survivors. We have work to do.”

“Bill Cosby is STILL an evil rapist. The end,” she added.

“I am furious to hear this news,” Amber Tamblyn wrote on Twitter. “I personally know women who this man drugged and raped while unconscious. Shame on the court and this decision.”

Aisha Tyler and Rosie O’Donnell expressed their thoughts more succinctly, with Tyler writing, “THE F**K IS THIS BULLS**T,” and O’Donnell tweeting, “I GUESS 70 WOMEN WERENT ENOUGH – f**k u bill.”

Attorney Lisa Bloom, who represents three of Cosby’s accusers said she was “disgusted that he is a free man today.”

“He is not released because he is innocent,” she shared in a Twitter thread. “He is released because a prosecutor promised him years ago that he would not be brought to justice, without even making a deal for him to do time.”

“Every day I fight for sexual assault victims and have to advise them of the ugly truth: the system still massively favors the rich and powerful,” Bloom added. “You need a superhuman level of strength and courage. Luckily many victims have it. Any other Cosby victims, time to come forward!”

See more reactions below:

More from ET:

Bill Cosby to Be Released From Prison as Conviction Is Overturned

Bill Cosby Smiles in Latest Mugshot Trending on Social Media

Camille Cosby Hopes Husband Bill Cosby Finds ‘Vindication’ in Appeal