A judge in the US has rejected a defamation lawsuit brought by adult film star Stormy Daniels against President Donald Trump, and ordered her to pay his legal fees.

Judge S James Otero dismissed the suit by Daniels, whose real name is Stephanie Clifford, filed earlier this year after Trump claimed on Twitter she had invented threats to silence her over an alleged sexual encounter between the two more than a decade ago. She said Trump’s tweets made her look like a liar.

Daniels still has a separate lawsuit linked to $130,000 she was allegedly paid by Trump’s lawyer shortly before the November 2016 presidential election to keep quiet about the affair.

In the defamation case, the judge ruled Trump’s tweet was the kind of “rhetorical hyperbole” normally associated with politics and public discourse in the United States, and protected under the First Amendment of the US Constitution.

Daniels’ lawyer has said he will appeal the decision.