Former Montgomery County District Attorney Bruce Castor wrote a recent email saying he had agreed a decade ago that a key deposition from a civil suit could not be used against Bill Cosby in any criminal case, according to CNN.

Co-written by Michael Smerconish, the article suggests the email could derail the current criminal case against the 78-year-old comedian.

Castor "agreed more than a decade ago" verbally that the district attorney's office wouldn't allow use of the deposition for a criminal case against Cosby, according to the report. 

Castor sent the email last year to then-D.A. Risa Vetri Ferman, CNN reported.  In the email, Castor told Ferman the agreement was part of the 2005 sexual assault civil suit brought against Cosby by Andrea Constand. Cosby made the deposition, which could be damaging, during those proceedings.

Castor said he made the deal in 2005 so Constand would stand a better chance in her suit because Cosby would have no reason of invoking his 5th Amendment right to remain silent.

CNN said the email was sent just a few months before current district attorney, Kevin Steele, filed criminal charges against Cosby in December.

Castor wrote to Ferman: "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."

But Steele, elected in November, suggested to CNN that the email would not derail his case.

"There is a specific legal method to grant immunity," Steele said. "That was not done in 2005."