Bill Cosby has been ordered to stand trial on sexual assault charges over allegations that he drugged and assaulted a woman in 2004.

The ruling by a Pennsylvania judge came after a preliminary hearing that Cosby (78) attended in Montgomery County in which witnesses testified about statements that Cosby and his accuser, Andrea Constand, gave to police in 2005.

In court, Cosby responded with "thank you" when Judge Elizabeth McHugh announced her decision. She wished him luck.

Ms Constand, a former basketball coach at Cosby's Temple University alma mater, is the only woman whose accusations of sexual assault have resulted in criminal charges against Cosby.

Once one of the most beloved US entertainers, Cosby has been hit by a wave of sexual assault allegations from more than 50 women, although most of the cases are too old to be prosecuted. He has denied ever assaulting anyone.

Ms Constand told police she was attacked as she lay on a sofa "paralysed" by drugs the entertainer had given her, said a former detective reading from a transcript of Ms Constand's police interview.

Cosby told her the pills would help her relax and "take the edge off". So Ms Constand swallowed the pills, added a sip of wine and told the comedian that she trusted him, the former detective said.

Less than an hour later, according to Ms Constand, Cosby sexually assaulted her as she lay incapacitated by the drugs she had taken, the former detective said.

Cosby's own 2005 interview with police in Cheltenham, Pennsylvania, where the purported 2004 assault took place, was also introduced as evidence.

Cosby admitted to police he gave Ms Constand the antihistamine Benadryl to "relax her".