A federal judge in Los Angeles has dismissed Ashley Judd’s sexual harassment claim against Harvey Weinstein but said she could proceed with a defamation claim against him.

Judd had accused Weinstein of defaming her in 1998 after she refused what she said were his sexual advances a year earlier.

In her lawsuit, filed in April 2018, the actor accused Weinstein of smearing her reputation by discouraging director Peter Jackson from casting her in his blockbuster movie franchise The Lord of the Rings.

Judd, one of the first women in October 2017 to publicly accuse Weinstein of sexual misconduct, had accused the Hollywood movie mogul of sexual harassment in violation of a California law barring such conduct by a person in a “business, service or professional relationship” with another.

In a footnote to his ruling on Wednesday, District Judge Philip Gutierrez said he was not determining whether Judd was sexually harassed by Weinstein “in the colloquial sense of the term”.

But Gutierrez said Judd’s relationship as an actor with the film producer was not covered under the California statute she had cited.

Weinstein’s lawyer, Phyllis Kupferstein, said in a statement: “We have said from the beginning that this claim was unjustified, and we are pleased that the court saw it as we did. We believe that we will ultimately prevail on her remaining claims.”

But Judd’s attorney, Theodore J Boutrous Jr, said the ruling did not upend Judd’s complaint: “Nothing about today’s ruling changes that Ms Judd’s case is moving forward on multiple claims.

“We look forward to pursuing the three claims for relief that the court has already ruled can move forward.”

Weinstein is to stand trial in May in New York on five charges, including rape, involving two other women.

The disgraced Hollywood producer has been accused of sexual misconduct by more than 70 women. He has consistently denied the accusations, saying any sexual encounters were consensual.

Judd’s lawsuit had alleged Weinstein “cornered her in a hotel room in 1997 under the guise of discussing business”. When she refused his demands, he retaliated by making what she called “baseless smears” against her to Peter Jackson and she lost a part in The Lord of the Rings.

Weinstein denied defaming Judd or interfering with her career.