Bill Cosby, the once-celebrated US actor and comedian, is a step closer to facing a criminal trial over a sexual assault allegation after a judge rejected an appeal to dismiss the case.

Cosby, 78, is accused drugging and violating a woman at his Philadelphia home in 2004 - an allegation he vehemently denies.

After a two-day hearing in Pennsylvania, a judge denied Cosby's lawyers' claims that a previous ruling in 2005 made him immune from prosecution.

The next step is a preliminary hearing on March 8 to decide whether prosecutors have enough evidence to put him on trial.

Cosby could go to prison for up to 10 years if convicted.

The TV star held his head in his hands as the ruling was read out.

Dozens of women have accused Cosby of sexually assaulting them in attacks dating back to the 1960s.

He has denied all the claims.