A federal judge in Los Angeles has awarded President Donald Trump nearly $300,000 in attorney fees in a defamation lawsuit filed by Stormy Daniels, the porn actress who alleges she had an affair with the president prior to his election.

U.S. District Judge S. James Otero of the Central District of California awarded Trump $292,052.33—a 25 percent reduction of the total $389,403.11 in fees and costs the president and his lawyers at Harder LLP requested after the judge dismissed Daniels' defamation claim in October.

Otero found that the hourly rates charged by Trump's attorneys, which ranged from $841.64 per hour for partner Charles Harder to a little more than $300 per hour for an associate at the firm, were reasonable. However, the judge found that the hours the firm spent on the matters handled were “excessive.”

Daniels sued Trump on April 30 alleging he posted false statements on Twitter when belittling a composite sketch she claimed depicted a man who threatened her to keep quiet about the affair in 2011. The president's tweet said: “A sketch years later about a nonexistent man. A total con job, playing the Fake News Media for Fools (but they know it)!”

Otero in October found that the tweet was the sort of “rhetorical hyperbole” associated with political speech in the United States protected by the First Amendment. In Tuesday's order, the judge called the matter “unique in its nature and scope.”

“It involves a defamation claim against the sitting president of the United States based on a tweet issued by the president from his personal Twitter account,” Otero wrote. “The president has used this Twitter account extensively, both during his campaign and afterwards. The litigation before this court therefore impacts what the president may or may not say in a public forum.”

Daniels' lawyer, Michael Avenatti, took to Twitter to suggest that his client will never have to pay Trump or his former personal attorney Michael Cohen because he expects to win a related matter over a nondisclosure agreement between the parties.

In a statement to CNN, Harder called the ruling “a total victory for the president.”

“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,” he said.

Read Judge Otero's fee ruling below:

Read more: