Maria Puente, USA TODAY and Brittany Horn

USA TODAY Network

NORRISTOWN, Pa — Bill Cosby's first hearing here in the criminal sexual-assault case against him is proving to be a mixed bag so far in helping or hurting his efforts to persuade a judge to dismiss charges.

Former District Attorney Bruce Castor, considered by the Cosby legal team to be a key witness, testified that he declined to pursue criminal charges against him years ago because of "credibility" issues with Cosby's accuser in the case, ex-Temple University employee Andrea Constand.

Castor also testified he hopes Cosby fails in his efforts to get the case thrown out.

And this is just the beginning. Depending on the outcome of this hearing, the sole criminal case against Cosby could be over before trial. Or, it could be the first of several pre-trial hearings to deal with Cosby motions to avoid a trial.

Castor was called to testify that there was “insufficient, credible and admissible evidence” in 2005 to show Cosby had committed a crime without a reasonable doubt. Plus, Castor told the court, Constand didn't behave like a victim of sexual assault.

“The behavior detailed within (police interviews) was inconsistent with a person who had been sexually assaulted," Castor testified. "Her actions, on her own, including going to a lawyer before going to police, had created a credibility issue for her that could never be improved upon.”

Still, he was firm: He supports the prosecution team against Cosby.

“Let’s be clear," Castor said to Cosby's attorney. “I’m not on your team here. I want (prosecutors) to win” at the hearing.

On cross examination, Castor was asked whether he believed what Constand said happened to her more than a decade ago. What he believes and what he can prove are two different things, he replied.

"What I think is that Andrea Constand was inappropriately touched by Mr. Cosby,” Castor said. “I am not analyzing back in 2005 as to what I think. I am analyzing it back in 2005 as to what I can prove."

Therefore, he said, he declined to prosecute Cosby. He said that meant Cosby had to testify in the civil case Constand later brought against him, and could not claim his Fifth Amendment right. Castor said he thought getting Constand money from Cosby via a civil suit would be “the best he could do.”

The hearing concluded after 5 p.m. and about seven hours. It will continue on Wednesday and the judge said he expects to make a decision then.

By 4 p.m., everyone in court appeared fatigued. Cosby, 78 and seemingly frail, appeared to be falling asleep in his seat, while Castor, 54, looked increasingly tired on the stand. His testimony concluded on Tuesday, and it's not clear who else will be called Wednesday to testify.

What's going to happen at first Bill Cosby criminal hearing?

The scene outside the courthouse resembled the scene on Dec. 30, when Cosby was charged and arraigned on charges of felony indecent sexual assault stemming from an encounter 12 years ago at his nearby home with Constand, who accused him a year later of drugging and raping her.

. After Castor declined to prosecute Cosby, Constand sued him in civil court, and Cosby testified for three days in a deposition. The suit was eventually settled on undisclosed terms and sealed in 2006.

Since then, some five-dozen women have accused Cosby of drugging and/or sexually assaulting them in episodes dating back to the 1960s.

Last year, excerpts of Cosby's deposition were released and the new district attorney , Kevin Steele, filed charges just weeks before the state statute of limitations was due to expire.

Steele intends to press his case against Cosby based in part on Cosby's own words in the Constand deposition.

Cosby's legal team is arguing that the charges should be dismissed because of a "no-prosecution" deal in 2005, when Castor says he told Cosby's lawyer that if Cosby answered questions in the Constand deposition, Castor would agree not to prosecute Cosby based on the deposition.

Without saying whether it was a good or bad decision, Judge O'Neill explored in more detail why Castor made the non-prosecution decision in the first place. Castor argued that it was within his prosecutor's duties as a "minister of justice" to push for a resolution in Constand's civil case.

.

Steele has argued against Cosby's motion to dismiss, saying any immunity deal by Castor should have been written down and agreed to by a judge, and since it wasn't, it's irrelevant in this case.

But Castor said he believes his decision on the deal is binding on his successors and forever closes the door on prosecuting Cosby.

"For all time, yes," Castor said when pressed on the point.

Some legal analysts say that if Cosby can demonstrate that he relied on Castor's promise to his detriment — by agreeing to testify in the deposition — then he might be able to persuade the judge to throw out the deposition — or even dismiss the charges altogether.

Maria Puente reported from McLean, Va. Brittany Horn of The News Journal reported from Norristown, Pa.