Bill Cosby was released from prison this week after a court overturned his 2018 conviction for sexual assault, in a reversal of one of the first high profile sexual misconduct convictions in the #MeToo era.

The Pennsylvania Supreme Court ruled 4-3 that his conviction should be thrown out over a procedural problem: a former prosecutor had committed to not charging Cosby in a 2005 civil case.

Former Suffolk sheriff and Massachusetts Public Safety Secretary Andrea Cabral joined Boston Public Radio to talk through the court's reversal.

In their 79-page opinion, the judges wrote that the previous prosecutor, Bruce Castor, reached an agreement not to prosecute Cosby, which paved the way for Cosby to testify in a civil trial. In his 2005 testimony, the comedian testified to giving women drugs in an attempt to have sex with them. That testimony was then relied on by Castor's successor to prosecute the criminal assault case in 2015.

Cabral said that the court found the promise that Cosby wouldn't face proseuction was "relied on to his detriment," because of its use against him in the criminal trial. Cosby had waived his Fifth Amendment rights against self-incrimination by agreeing to testify, which the judges said was evidence he didn't think he would be criminally charged.

But, Cabral said, she takes issue with two factors regarding the court's decision: the victim had not been informed that the "non-prosecution agreement" had been reached with the district attorney until it was announced in a press release, and that no formal non-prosecution agreement was ever written up.

"This sort of loosey-goosey approach to this, which excluded the victim and her attorneys altogether, I'm very troubled by," said Cabral.