By Joseph Ax

NORRISTOWN, Pa. (Reuters) - A Pennsylvania judge on Thursday denied Bill Cosby's latest bid to have the sexual assault charges against him thrown out, ruling that the 78-year-old comedian must stand trial in the case.

Judge Steven O'Neill rejected Cosby's arguments that prosecutors violated his rights by refusing to call the accuser, Andrea Constand, as a witness at a preliminary hearing in May, thus shielding her from cross-examination.

"This case shall proceed to trial on those counts," O'Neill said at the conclusion of a three-hour hearing in the Montgomery County Court of Common Pleas.

Once one of the most beloved U.S. entertainers thanks to his family-friendly persona, Cosby is facing accusations of sexual assault from dozens of women stretching back decades.

Constand's allegations that Cosby assaulted her at his home in 2004 have resulted in the only criminal prosecution against him, as most of the other claims involve incidents that are too old to produce charges.

Cosby, who wore a pinstriped tan jacket and used a cane to walk on Thursday, has denied assaulting anyone and has portrayed the encounter with Constand as consensual.

"Today someone who has given so much to so many had his constitutional rights trampled once again," said Brian McMonagle, a lawyer for Cosby, after O'Neill's ruling.

Thursday's proceeding stemmed from a preliminary hearing in May to determine whether enough evidence existed to hold Cosby over for trial.

At that hearing, prosecutors chose not to call Constand as a witness. Instead, two police detectives who took her statement in 2005 testified as to what she told them at the time.

Christopher Tayback, one of Cosby's lawyers, said prosecutors were using "hearsay evidence" improperly, robbing Cosby of his constitutional right to confront his accuser while relying on an 11-year-old statement plagued with inconsistencies.

"It's a statement that on its face begs more questions than it answers," he said.

Cosby's lawyers said the case should be dismissed or, in the alternative, Constand should be ordered to testify at a new preliminary hearing and face cross-examination.

But prosecutors said current case law allows the use of hearsay at preliminary hearings, even though the issue is pending before the Pennsylvania Supreme Court.

District Attorney Kevin Steele told O'Neill his office did not want to "re-traumatize victims" by requiring them to testify about their assaults multiple times.

"They're saying they want to confront the witness?" Steele told reporters following the hearing. "Let's go to trial and confront the witness. We want to get this case in front of a jury, and he can have a jury of his peers decide if he's guilty."

Thursday's hearing offered a preview of the defense trial strategy, which will likely focus on Constand and her credibility.

Constand, a former basketball coach at Cosby's alma mater Temple University, has accused him of drugging her and then assaulting her on a couch. Cosby has admitted giving her the allergy medication Benadryl but maintained they engaged in consensual acts.

(Reporting by Joseph Ax; Editing by Richard Chang and Tom Brown)