Stormy Daniels, the adult film star who says she had an affair with Donald Trump, was ordered to pay nearly $300,000 in the president’s legal fees Tuesday after her defamation lawsuit was thrown out in October.

U.S. District Judge James Otero ruled that Daniels, whose legal name is Stephanie Clifford, must pay Trump $293,052 in fees, court costs and sanctions over the suit, which was filed after Trump used his personal Twitter account to suggest Daniels lied about being threatened to stay quiet about their alleged affair.

“A total con job, playing the Fake News Media for Fools,” Trump wrote about Daniels in April after she said an unnamed man had made a threat against her in 2011. The president has denied her claim that they had an affair in 2006; however, two investigations appear to back her claim that she was paid through Trump’s lawyer to stay silent during the 2016 presidential campaign.

Otero said Trump’s April comments were protected by the First Amendment, noting that “the tweet in question constitutes ‘rhetorical hyperbole’ normally associated with politics and public discourse in the United States.”

Michael Avenatti, Daniels’ attorney and a vocal critic of the president, has filed an appeal in the case. On Twitter late Tuesday he defended his client, saying she would “never have to pay a dime.”

“Not one penny. It is the end of the first quarter, not the end of the game,” Avenatti wrote in response to a critic. “And if you actually read any of the filings in the [nondisclosure agreement] case, you would realize they are going to owe at least $1,500,000.”

Trump and his attorney's attempt to fool the public about the importance of the attorneys' fees in the defamation case, which are a fraction of what they owe my client in the main NDA case, is an absolute joke. People are smarter than that.https://t.co/oo3kkjVzPU via @YouTube — Michael Avenatti (@MichaelAvenatti) December 11, 2018

Daniels is also suing Trump in a separate matter related to the nondisclosure agreement that prevented her from speaking about the alleged affair. She claims the deal was never valid because Trump didn’t sign it.

During his ruling in October, the judge ordered Daniels to pay the legal fees, and Trump’s lawyers had requested she pay nearly $800,000. Otero denied that request, saying the president’s legal team spent “excessive” time working on the case.

“Ultimately, Defendant’s counsel did not need to spend as much time as they did conducting legal research and compiling factual exhibits that would not properly be before this Court,” the judge wrote.

Despite the fractional amount, Trump’s lawyers celebrated the news.

“The court’s order, along with the court’s prior order dismissing Stormy Daniels’ defamation case against the president, together constitute a total victory for the president, and a total defeat for Stormy Daniels in this case,” Charles Harder, an attorney for Trump, told Reuters in a statement.