The embattled comedian is facing felony charges of aggravated indecent assault amid allegations he drugged and sexually assaulted Andrea Constand, a former employee of his alma mater Temple University, at his Pennsylvania home in 2004.

The actor was not charged at the time, but he did strike a confidential settlement in a 2005 civil lawsuit filed against him by Constand.

His deposition in the case remained sealed until last year (15), when it was revealed he had admitted to obtaining powerful sedatives to give to women he wanted to sleep with. The evidence was enough for prosecutors to press charges.

Cosby, who maintains his innocence, has since tried to fight back, arguing Constand should be made to pay back the financial sum she received because she violated the terms of the settlement by co-operating in the criminal trial.

The case went before U.S. District Judge Eduardo Robreno on Friday (15Jul16), when he shut down Cosby's breach of contract claim.

However, the judge did give the entertainer permission to proceed with legal action over messages Constand posted to Twitter.com in 2014 and remarks she made about the case to the Toronto Sun newspaper last summer (15).

Cosby can also sue her lawyers, Dolores Troiani and Bebe Kivitz, for an open letter published in the Philadelphia Inquirer, in which they addressed Bruce L. Castor, Jr., the previous district attorney who declined to prosecute the star back in 2004.

In addition, the 79-year-old can investigate how his deposition made its way to the media, leading to his arrest in December (15).

Cosby's representatives have declined to comment on the lawsuit ruling, which emerges as the actor prepares to be arraigned for his criminal charges on Wednesday (20Jul16).

The veteran comedian, who is free on $1 million (£754,000) bail, has been accused of rape, drugging and/or performing inappropriate sex acts by over 50 women. He has denied all allegations. Almost all of the decades-old incidents cannot be brought to trial because the accusers waited too long to file complaints against Cosby.

He faces up to 10 years in prison if convicted in the criminal trial.