LOS ANGELES — A federal judge on Tuesday ordered adult film star Stormy Daniels to pay President Donald Trump almost $300,000 in legal fees in connection with her failed defamation lawsuit against him, but he declined to award the full amount they requested or to add any sanctions beyond a token penalty of $1,000.

U.S. District Judge James Otero in October dismissed Daniels' suit against Trump, who accused Daniels in a tweet on April 18 of having fabricated a story that a man told her to leave Trump alone and suggested that something bad could happen to her if she didn't.

A sketch years later about a nonexistent man. A total con job, playing the Fake News Media for Fools (but they know it)! https://t.co/9Is7mHBFda — Donald J. Trump (@realDonaldTrump) April 18, 2018

Otero found that the tweet "constitutes 'rhetorical hyperbole' normally associated with politics and public discourse in the United States" protected under the First Amendment, and he dismissed it under a Texas law that limits lawsuits intended to silence political speech through legal intimidation.

Such suits are called Strategic Lawsuits Against Public Participation, or SLAPP cases. Otero applied Texas law because Daniels is a resident of Texas.

The Texas law requires the losing party in a SLAPP case to pay the other side's legal fees. Trump's attorneys requested $340,000, but Otero on Tuesday said they were entitled to $292,052.33, finding that they had requested payment for more hours than they reasonably would have been expected to work.

"To litigate Plaintiff's defamation claim, Defendant used two partners and one senior associate in addition to two junior associates. Defendant could have streamlined litigation by distributing more work to the junior associates," he wrote.

The Texas law also allows judges to impose extra sanctions to deter plaintiffs from bringing such "frivolous" cases in the future. But Otero found that the legal fees were enough, and noting that Daniels hasn't brought any other suits against the president for similar statements about her, he awarded only $1,000 in extra penalties.

"Plaintiff's unwillingness to resort to litigation in light of Defendant's continuing use of rhetorical hyperbole suggests that Plaintiff is already being deterred from filing meritless defamation claims," he wrote in a nine-page ruling filed in Los Angeles.

Trump's attorney, Charles Harder, nonetheless called the award "a total victory for the president, and a total defeat for Stormy Daniels in this case."

Daniels didn't immediately respond to a request for comment. Her attorney, Michael Avenatti, said Tuesday on Twitter that Trump and his attorneys were trying 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."

"The main NDA case" refers to a separate suit that Daniels has filed against Trump and his former personal attorney, Michael Cohen, seeking to invalidate a non-disclosure agreement, or NDA, in which Cohen paid her $130,000 to remain silent about an affair she has alleged that she had with Trump before the 2016 presidential election.

Attorneys for Trump and Cohen filed documents in September indicating that they don't intend to enforce the agreement. But Avenatti countered at the time that he and his client wanted to go forward with that suit, anyway.