A federal judge in Los Angeles on Monday threw out adult-film actress Stormy Daniel’s defamation lawsuit against President Trump on free-speech grounds.

“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 U.S.,” U.S. District Judge S. James Otero in Los Angeles said in a ruling Monday, as Bloomberg reported. “The First Amendment protects this type of rhetorical statement.”

As Fox News previously reported, Daniels, whose real name is Stephanie Clifford, sued the president in April over a tweet in which he denied her claims of being threatened by a man in a Las Vegas parking lot in 2011.

Daniels said the man was threatening her for going public about an alleged sexual encounter with Trump in 2006. Trump has denied the affair took place, and cast doubt on her story of being threatened.

“A sketch years later about a nonexistent man. A total con job, playing the Fake News Media for Fools (but they know it)!” Trump tweeted. He retweeted a side-by-side image comparing the sketch with a photo of Daniels’ husband.

Trump’s camp labeled the Monday ruling as a major win.

“The ruling also states that the President is entitled to an award of his attorneys’ fees against Stormy Daniels,” Trump attorney Charles Harder said in a statement to Fox News. “No amount of spin or commentary by Stormy Daniels or her lawyer, Mr. (Michael) Avenatti, can truthfully characterize today’s ruling in any way other than total victory for President Trump and total defeat for Stormy Daniels.  The amount of the award for President Trump’s attorneys’ fees will be determined at a later date.”

Avenatti, who previously said the tweet damaged Daniels’ credibility by portraying her as a liar, responded to the ruling via Twitter: “…Judge’s limited ruling: Daniels’ other claims against Trump and Cohen proceed unaffected. Trump’s contrary claims are as deceptive as his claims about the inauguration attendance. We will appeal the dismissal of the defamation cause of action and are confident in a reversal.”

STEVE HILTON: AFTER KAVANAUGH CONFIRMATION, LOOK FOR NEXT DEM PRESIDENT TO 'PACK THE COURT'

Avenatti frequently has criticized Trump in the mainstream media and has said he’s considering challenging him in the 2020 presidential race.

“There is something really rich in Trump relying on the First Amendment to justify defaming a woman,” Avenatti added about the decision.

A federal judge dismissed Stormy Daniels’ defamation lawsuit against President Trump on Monday, saying the president made a “hyperbolic statement” against a political adversary when he tweeted about a composite sketch the adult film actress’s lawyer released. (AP, File)

Daniels’ lawsuit over a hush-money deal is pending. Avenatti has said he wants to keep the case alive.

Trump and his former personal lawyer, Michael Cohen, want the court to toss out the litigation as moot.

Daniels originally sued Trump and Cohen, who negotiated the deal, so she could speak publicly about the reported tryst without fear of reprisal. Cohen had threatened to sue her for $20 million.

Lawyers for Trump and Cohen now say the deal that paid Daniels $130,000 to keep quiet was invalid and they won’t sue her for breaking it.

ALLEGATIONS AGAINST KAVANAUGH FROM AVENATTI CLIENTS

Daniels has said she had sex once with Trump in 2006, and carried on a friendship with him for about a year.

Daniels had said the agreement should be invalidated because Cohen signed it, but Trump didn’t.

Cohen pleaded guilty last August to campaign finance violations for arranging payments both to Daniels and to a former Playboy model to influence the election.

Fox News’ Bradford Betz and The Associated Press contributed to this report.