Bill Cosby "Inappropriately Touched" Andrea Constand: Former DA

A former Montgomery County District Attorney, who refused to prosecute Cosby a decade ago, testified at a hearing where a judge will decide whether to drop the sexual assault case against the comedian.

Bill Cosby arrived in court Tuesday at a hearing where his lawyers are pushing to get the only criminal charges against him dismissed based on what they say is a former district attorney's promise years ago not to prosecute the comedian.

In December 2015, Cosby was arrested and charged with three counts of aggravated indecent assault, a second-degree felony, which stemmed from an investigation into an incident of alleged sexual assault that occurred at the comedian’s home in Cheltenham, Pennsylvania, in 2004. This was the first time criminal charges were brought against the embattled comedian.

The victim, Andrea Constand, who met Cosby through her work at Temple University between 2001 and 2004, accused him of drugging and sexually assaulting her.

Former Montgomery County District Attorney, Bruce Castor, testified for the defense at Tuesday's hearing saying he saw "red flags" in Constand's yearlong delay in reporting her sexual assault, 6ABC News reported. Castor, who has insisted that he had promised Cosby years ago not to prosecute him, also testified that he found inconsistencies in Constand's story. He said that her actions, including approaching a lawyer before going to the police, damaged her credibility before she filed charges. However he stated, "What I think is that Andrea Constand was inappropriately touched by Mr. Cosby." He said he was hopeful that he had made Constand "a millionaire" through the civil lawsuit. Castor said the agreement not to prosecute Cosby was binding and that Cosby would have "had to have been nuts" to say what he did in the deposition for the 2005 civil lawsuit if he thought he was going to be prosecuted.

On Wednesday, Constand's attorney, Dolores Troiani, testified that Castor had never informed her about a non-prosecution agreement with Cosby. She also said that Cosby "was not forthcoming" during his deposition in the civil suit, and that "there was a lot of yelling and screaming, trying to divert attention."

Cosby has been accused of sexual assault by more than 40 women over the years but has denied all allegations against him. He is currently involved in defamation lawsuits against some of them.

In January, Cosby filed a motion to dismiss the criminal charges against him, claiming that Cosby's former lawyer, Walter M. Phillips, and Castor made a "binding non-prosecution agreement." As part of the oral agreement, Castor agreed not to file charges against Cosby in exchange for his testimony in a 2005 civil lawsuit brought by Constand.

Cosby’s legal team will also ask the court to disqualify the current Montgomery County district attorney, Kevin Steele, from prosecuting the case. Steele has said there is no evidence of a written agreement needed to get the case against Cosby dismissed.

Cosby's motion also contended that the comedian suffers from memory loss and poor eyesight that have left him "substantially impaired" and unable to defend himself.