Media playback is unsupported on your device Media caption Bill Cosby leaves court after the hearing in Norristown

A US judge has ordered actor and comedian Bill Cosby to stand trial on charges of sexual assault.

Mr Cosby, 78, is accused of drugging and molesting a former Temple University employee in his home near Philadelphia in 2004.

The case was reopened last year after more than 40 women came forward with similar accusations. No trial date has been set.

Mr Cosby has maintained that all of the encounters were consensual.

During the hearing, Mr Cosby's lawyer had a heated exchanged with the judge over police reading a statement from the accuser, Andrea Constand.

Brian McMonagle argued that Ms Constand, who lives in Toronto, should have testified in person and called her statement "hearsay".

Ms Constand described how Mr Cosby allegedly sexually violated her after giving her three blue pills. She said the pills made her dizzy and made her legs "like jelly".

"I told him, 'I can't talk, Mr Cosby'. I started to panic," she said.

Mr Cosby said in a statement read in court that she never told him to stop during the encounter.

In the courtroom - Laura Bicker, BBC News

This hearing was not the showdown that many anticipated - the accused did not get to face his accuser in court. That lies ahead when Cosby returns for a trial.

But the absence in court of Andrea Constand angered Cosby's defence team. Lawyer Brian McMonagle railed at the judge. He said the police statements were mere hearsay - based on what "someone told someone else 12 years ago".

District Judge Elizabeth McHugh at one point accused him of "grandstanding" and reminded him this was not a trial but a preliminary hearing.

Cosby himself sat composed throughout, even when he was told he would stand trial. The judge wished him luck and he calmly replied "thank-you".

Just a few rows behind his bench sat Gloria Allred, who represents many of the women who have come forward with allegations of sexual abuse. As she made her way downstairs to the waiting media, she simply muttered "right result".

Image copyright AP Image caption Andrea Constand says she was assaulted by Mr Cosby in 2004

More than 40 women have accused Mr Cosby of sexual assault, but in nearly all of the cases too much time has elapsed for charges to be pursued.

The Constand case is unusual in that it fell within the statute of limitations for charges.

He is facing civil lawsuits in other states over the other accusations. Mr Cosby is free on $1m bail.

More on the Bill Cosby allegations

Mr Cosby is best known for his role as the father in the television hit The Cosby Show which ran from 1984 to 1992 and was a huge hit in the US and around the globe.

It made the comedian one of America's most popular entertainers.

The comedian, once the highest paid US television star, could go to prison for 10 years if convicted.

Ms Constand has said that she came to think of Mr Cosby as a "mentor and a friend" before she said he made unwanted sexual advances.

She went to visit him at his home in 2004 where she said he drugged and sexually assaulted her.

A criminal complaint unsealed last year details the encounter.

Image copyright Getty Images Image caption Mr Cosby cut short a stand-up comedy tour after his accusers and their supporters held protests

Prosecutors allege that the victim protested when Mr Cosby offered her a glass of wine, saying she had not eaten that day.

He urged her to drink wine anyway, Ms Constand said in her testimony, so she drank a few sips along with the pills.

Within 30 minutes, she says she experienced blurred vision and had trouble speaking. Mr Cosby then told her to lie down on the couch and relax.

During that time she was lying on the couch, she says she was aware of Mr Cosby moving toward her, touching her breasts and genitals, and making her touch his genitals.

She says she did not consent to any of the acts, that she could not speak, and that she felt "frozen" and "paralysed".

Prosecutors re-opened her case last summer. She and Mr Cosby settled a lawsuit in 2006 and she was paid an undisclosed sum.