▶ Watch Video: Legal expert on Bill Cosby’s conviction being overturned

Bill Cosby was released from prison Wednesday after the Pennsylvania Supreme Court overturned his sexual assault conviction, officials said. Cosby, 83, was convicted of sexually assaulting Andrea Constand at his home in 2004.

The Pennsylvania Department of Corrections said Cosby was released from a Phoenix prison just before 2:30 p.m. on Wednesday.

In its ruling, the Pennsylvania Supreme Court said a “non-prosecution agreement” agreement with a previous prosecutor prevented Cosby from facing charges. With the ruling, the judges wrote that “Cosby’s convictions and judgment of sentence are vacated, and he is discharged.”

In 2005, Bruce Castor, the top prosecutor in Montgomery County, found it would be difficult to prosecute Cosby due without any “corroborating forensic evidence” and that testimony from other accusers would be inadmissible, the court wrote.

The court said Castor declined to prosecute Cosby in exchange for his testimony, without his Fifth Amendment rights, in a subsequent civil case. It said Castor’s successor, District Attorney Kevin Steele, violated these terms when he arrested Cosby in 2015. 

“In light of these circumstances, the subsequent decision by successor D.A.s to prosecute Cosby violated Cosby’s due process rights,” the judges wrote. 

“There is only one remedy that can completely restore Cosby to the status quo ante,” they wrote. “He must be discharged, and any future prosecution on these particular charges must be barred. We do not dispute that this remedy is both severe and rare. But it is warranted here, indeed compelled.”

In 2018, Cosby was convicted on three counts of indecent assault and later sentenced to serve three to 10 years in state prison. 

Bill Cosby on September 24, 2018.

David Maialetti/REUTERS

In a statement, Steele said Cosby was freed on a “procedural issue that is irrelevant to the facts of the crime.” 

“The majority decision by the Pennsylvania Supreme Court orders the release of William H. Cosby Jr. from state prison,” Steele said. “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.”

Phylicia Rashad, who played Cosby’s wife on “The Cosby Show,” celebrated the news Wednesday. “FINALLY!!!! A terrible wrong is being righted — a miscarriage of justice is corrected!”

Meanwhile, Amber Tamblyn, a co-founder of Time’s Up, was angered by it: “I am furious to hear this news. I personally know women who this man drugged and raped while unconscious. Shame on the court and this decision.”

This story is breaking and will be updated.