NORRISTOWN, PENNSYLVANIA - MAY 24: Actor and comedian Bill Cosby arrives for a preliminary hearing on sexual assault charges at Montgomery County Courthouse on May 24, 2016 in Norristown, Pennsylvania. (Photo by William Thomas Cain/Getty Images)

A Pennsylvania judge ruled Tuesday that comedian Bill Cosby should stand trial for allegedly drugging and molesting a woman in his Philadelphia-area home in 2004.

Cosby, 78, was present for the preliminary hearing in Montgomery County as the prosecution and his defense argued over statements that he and Andrea Constand, who accused him of the assault, made to authorities more than a decade ago. He's been charged with three counts of aggravated indecent assault in the only criminal case against him. More than 50 women have accused him of some form of sexual misconduct.

The statements detailed an encounter between Cosby and Constand in his suburban mansion. The two agreed that Cosby gave Constand some pills, but they differed on whether the sexual contact that followed was consensual.

"Based on the evidence, I am going to hold you on charges,” Judge Elizabeth McHugh said before tentatively scheduling his formal arraignment for July 20. Cosby waived his right to the arraignment Tuesday, setting the case to go to trial after that date.

Constand told police in 2005 that she was "paralyzed" from the drugs and unable to talk as Cosby groped her, according to her statement that was read aloud in court. Before she took the three pills, Cosby told her they would "take the edge off," according to her statement.

At some point, after Cosby helped her to a sofa, she said she passed out and awoke hours later to find her bra askew.

Constand's statement to police, read by detective, described her feeling dizzy and "in and out" after Cosby gave her pills and wine.

Constand was neither in court nor called to testify, despite objections from Cosby's defense attorney, Brian McMonagle, who claimed that reading her statement amounted to "hearsay."

In Cosby's statement, which was also read aloud by a police officer, the entertainer said Constand was a "willing participant" as he touched her breasts and put his hand in her pants. He claimed the pills he gave her were Benadryl.

We recently heard #Cosby's statement given to police, where he admits to "petting" and sexual relations with Constand.

Cosby had invited Constand to his home to discuss her career. At the time, she worked for Temple University's women's basketball team.

She first alleged that Cosby had taken advantage of her to police in her native Canada about a year after the incident.

In a later phone conversation with Constand's mother, Cosby offered to pay for her daughter's graduate school education if she maintained a 3.0, according to his statement heard Tuesday. He also apologized for any pain he caused Constand or her family.

McHugh's ruling to go to trial was expected since Pennsylvania has a low threshold to clear to move ahead with a case.

A previous Montgomery County district attorney, Bruce Castor, chose not to pursue a criminal case against Cosby at the time. Constand then sued Cosby and they settled in 2006.

Kevin Steele, the newly elected DA, filed charges in December 2015 after Cosby's deposition from the lawsuit became public.

More than 50 other women have accused Cosby of varying forms of sexual misconduct, including rape, in incidents going back to the 1960s. Charges cannot be pursued in almost all the cases because the statute of limitations has expired.