Bill Cosby was finally arrested Dec. 30 in relation to the alleged 2004 rape of Andrea Constand, but now, a single email threatens to tank the entire case.

Back in 2005, a former Pennsylvania District Attorney allegedly made a verbal agreement with Cosby that he would not face criminal charges for any revelations made in the course of deposition testimony given in relation to the civil lawsuit that Constand brought against him after their encounter. The Daily Mail reports that former D.A. Bruce Castor explained the deal to his successor, Risa Vetri Ferman via email, saying that his intent in making the agreement was to help Constand’s civil case by eliminating the possibility of Cosby pleading the Fifth during deposition testimony.

“I can see no possibility that Cosby’s deposition could be used in a state criminal case, because I would have to testify as to what happened, and the deposition would be subject to suppression,” the email read. “I cannot believe any state court judge would allow that deposition into evidence… Knowing this, unless you can make out a case without that deposition and without anything the deposition led you to, I think Cosby would have an action against the County and maybe even against you personally.”

Although this email was sent just three short months before Cosby’s arrest, current D.A. Kevin Steele has said that he will fight to have the agreement thrown out on procedural grounds. Still, the 78-year-old’s legal team is fighting tooth and nail to ensure that Cosby’s admissions do not result in jail time. “A citizen’s constitutional rights cannot be thwarted by politically motivated prosecutors willing to break agreements made by their predecessors,” Cosby’s attorney Brian McMonagle wrote in a motion. “The commonwealth’s agreement must be enforced, and the charges dismissed.”