A federal judge on Tuesday ordered porn star Stormy Daniels to pay President Donald Trump more than $292,000 in attorneys' fees and another $1,000 in sanctions in connection with her dismissed defamation suit against Trump.

That was much less than the nearly $800,000 in legal fees and sanctions that Trump's lawyer Charles Harder asked for earlier this month in U.S. District Court in Los Angeles.

But Harder in a statement Tuesday said that Daniels was ordered to pay amount to 75 percent of Trump's legal fees. And he crowed that the $1,000 in sanctions are for her filing "meritless" defamation action.

That defamation suit came in response to a Trump tweet that all but called Daniels for claiming she was menaced by a man seeking to keep her quiet about a sexual tryst with 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."

Harder billed Trump $841.64 per hour in the case. The president's other lawyers charged rate ranging from $307.60 per hour up to $756.49 per hour.

Otero in his ruling called those rates "reasonable," noting that Trump's lawyers "are incredibly qualified."

Daniels's lawyer Michael Avenatti told CNBC in a text message predicted that Daniels will never have to pay Trump the $293,052.33 in attorneys' fees and sanctions because of other legal claims she still has against the president.

"Harder and Trump deserve each other because they are both dishonest," Avenatti wrote."They received less than one half what they asked for because the request was gross and excessive."

Avenatti's text referenced the fact that Daniels has a pending lawsuit against Trump that seeks damages in connection with a non-disclosure agreement that she has with him.

It also referenced the fact that Trump's former personal lawyer and fixer Michael Cohen pleaded guilty to federal campaign law violations that included one related to a hush-money payment to Daniels on the eve of the 2016 presidential election.

"Stormy will never have to pay a dime because they owe her over $1 million in attorney's fees and costs from the main NDA case, expecially in light of Cohen's guilty plea to a felony."

Cohen is scheduled to be sentenced for that crime and others unrelated to it in federal court in Manhattan on Wednesday.

WATCH: Trump underreported payments to Cohen in disclosures