A New York judge has ruled against Howard K Stern’s claim that being called gay is defamatory and entitles him to collect damages.

Stern, the former boyfriend of model Anna Nicole Smith, said the passages in a book titled Blonde Ambition: The Untold Story Behind the Death of Anna Nicole Smith defamed him.

Author Rita Cosby alleged that lawyer Stern and Larry Birkhead, another of Smith’s lovers, were once caught by her naked and having oral sex.

According to Reuters, US district judge Danny Chin dismissed the claim that being called gay was defamatory but acknowledged discrimination was still present.

He said: “I respectfully disagree that the existence of this continued prejudice leads to the conclusion that there is a widespread view of gays and lesbians as contemptible and disgraceful.”

The decision was welcomed by LGBT charity Lambda Legal.

Thomas W Ude Jr, senior staff attorney, said: “Today, the court made clear that defamation law cannot rely on prejudices about what it means to be gay in America.”

Judge Chin allowed Stern to progress with 11 of of his 19 claims of libellous statements.

Stern and Birkhead vied for custody of Smith’s baby girl Danielynn after the model died of a drug overdose in 2007.