The Pennsylvania Supreme Court has overturned the sexual assault conviction of disgraced actor and comedian Bill Cosby, citing the former entertainer’s reliance on a promise by a previous prosecutor not to press charges against him in exchange for testimony in a civil suit.

The ruling further discharges Cosby and bars any future prosecution on the charges.