A federal judge has pared back a lawsuit in which Bill Cosby claims a woman accusing him of sexual assault, her mother, two lawyers and the publisher of the National Enquirer violated a confidential settlement agreement.

Actor and comedian Bill Cosby arrives for a preliminary hearing on sexual assault charges. (Photo by William Thomas Cain/Getty Images)

U.S. Judge Eduardo Robreno ruled Friday that the accuser and others could not be sued for talking to law enforcement about her allegations.

The judge said, however, that other aspects of the lawsuit can proceed.

The comedian sued in February, claiming that all five parties breached a 2006 secrecy deal they had all signed and that the woman's actions have unjustly enriched her.

The confidential settlement agreement is "unenforceable as against public policy" if it prevents those who signed it from voluntarily talking to law enforcement about possible crimes, Robreno wrote.

The judge dismissed the accuser's mother from the lawsuit as well as all breach-of-contract allegations that relate to speaking to police about the matter.

Robreno allowed the case to continue regarding recent statements and actions by the accuser -- two tweets in early 2014 and a 2015 interview with the Toronto Sun. The lawsuit's claims regarding a separate lawsuit filed by the attorneys against a prosecutor and a letter they wrote that was published in The Philadelphia Inquirer were not thrown out.

American Media, the National Enquirer's publisher, also must still defend allegations it violated the agreement with several stories published over the past year.

Questions of fact remain that should be aired at trial, Robreno ruled. Those questions include "what was already in the public record when the National Enquirer published articles about Cosby" and "Cosby's own actions, and the timing thereof."

Cosby is awaiting trial in suburban Philadelphia for the alleged aggravated indecent assault of the woman in 2004. He paid an undisclosed amount to the alleged victim in 2006.

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)


Sign up for the NJ1015.com Newsletter

Get the best of NJ1015.com delivered to your inbox every day.