President Donald Trump has scored his first major legal victory against adult film actress Stormy Daniels.

A US judge has rejected her defamation suit against him. Ms Daniels' lawyer Michael Avenatti vowed to appeal the decision.

Ms Daniels - real name Stephanie Clifford - still has a separate lawsuit against Mr Trump linked to $130,000 in hush money she was paid by Mr Trump's lawyer shortly before the November 2016 presidential election to keep quiet about an alleged affair.

US District Judge S. James Otero in Los Angeles tossed out the defamation suit Ms Daniels filed earlier this year after Mr Trump claimed on Twitter that the adult film actress had invented threats to silence her over her claims the pair slept together more than a decade ago.

"The Court agrees with Mr Trump's argument because the tweet in question constitutes 'rhetorical hyperbole' normally associated with politics and public discourse in the United States," Mr Otero wrote in his ruling.

"The First Amendment (of the US Constitution) protects this type of rhetorical statement."