Porn actress Stormy Daniels was ordered on Tuesday to pay nearly $300,000 in attorneys’ fees to President Trump following the dismissal of a lawsuit she filed against him.

Daniels, who allegedly had a fling with Trump in 2006, was instructed to make the payments for filing a “meritless” defamation claim against the president, according to a court filing.

She had claimed the president smeared her on Twitter by calling her a liar.

US District Judge S. James Otero said the $292,052 in fees was a 25 percent reduction from the amount requested by Trump’s team.

Otero noted that the case “should have been litigated much more efficiently.”

Trump’s lawyer Charles Harder declared victory in the case.

“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 said in a statement.

Daniels’ lawyer, Michael Avenatti, said he would appeal the ruling and pointed to a larger case of a non-disclosure agreement Daniels’ signed about the affair.

“If Stormy has to pay $300k to Trump in the defamation case (which will never hold up on appeal) and Trump has to pay Stormy $1,500,000 in the NDA case (net $1,200,000 to Stormy), how is this a Trump win?” Avenatti tweeted.