Porn star Stormy Daniels’ defamation lawsuit against President Trump was dismissed by a California federal judge on Monday, prompting a swift appeal.

Daniels, who has been involved in a legal battle with Trump this year over an alleged extramarital affair, filed a defamation lawsuit against Trump in the spring for suggesting she lied. In particular, the lawsuit was over an April 18 tweet by the president that said a forensic sketch of a man who allegedly threatened Daniels over the alleged tryst — whose real name is Stephanie Clifford — in 2011 was a “total con job.”

Trump's legal team used a freedom-of-speech defense to get the suit tossed, and on Monday, U.S. District Judge James Otero agreed, saying the "one-off rhetorical comment" was protected by the First Amendment. “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.,” Otero said. “The First Amendment protects this type of rhetorical statement.”

In a statement, Trump attorney Charles Harder pointed out the ruling states Trump is "entitled to an award of his attorneys' fees against Stormy Daniels," and claimed the decision was a “total victory” for Trump and a “total defeat” for Daniels.

“No amount of spin or commentary by Stormy Daniels or her lawyer, Mr. Avenatti, can truthfully characterize today’s ruling in any way other than a total victory for President Trump and total defeat for Stormy Daniels,” Harder said in a statement Monday evening. “The amount of the award for President Trump’s attorneys’ fees will be determined at a later date.”

Daniels’ lawyer Michael Avenatti revealed soon after that his client had appealed the ruling in the liberal 9th Circuit Court of Appeals.

Trump has denied the affair with Daniels. His former personal lawyer Michael Cohen, who pleaded guilty to eight counts in August, paid her $130,000 in exchange for her silence on the affair, but she filed a lawsuit earlier this year claiming the nondisclosure agreement she signed should be nullified because Trump didn’t sign it.