A federal judge on Monday dismissed pornographic actress Stormy Daniels’ defamation lawsuit against President Donald Trump, an attorney for the president says.

The ruling states that the president is entitled to legal fees from Daniels, whose real name is Stephanie Clifford, which according to the lawyer, will be determined at a subsequent date.

President Trump’s lawyer Charles Harder released the following statement regarding the decision:

United States District Judge S. James Otero issued an order and ruling today dismissing Stormy Daniels’ defamation lawsuit against President Trump. The ruling also states that the President is entitled to an award of his attorneys’ fees against Stormy Daniels. A copy of the ruling is attached. No amount of spin or commentary by Stormy Daniels or her lawyer, Mr. Avenatti, can truthfully characterize today’s ruling in any way other than total victory for President Trump and total defeat for Stormy Daniels. The amount of the award for President Trump’s attorneys’ fees will be determined at a later date.

Last week Trump’s legal team argued that it made no sense for them to keep fighting in court over a $130,000 hush payment received by Clifford, also known as Stormy Daniels, as she invalidated the non-disclosure agreement she signed with Trump’s longtime fixer and lawyer, Michael Cohen.

Daniels’ lawyer, Michael Avenatti, vowed to appeal the judge’s decision and expressed confidence the judge would reverse the decision. “Re Judge’s limited ruling: Daniels’ other claims against Trump and Cohen proceed unaffected. Trump’s contrary claims are as deceptive as his claims about the inauguration attendance,” Avenatti tweeted. “We will appeal the dismissal of the defamation cause of action and are confident in a reversal.”

However, the dismissal likely doesn’t come as a complete surprise to observers of the case.

In September, Judge S. James Otero said a tweet the president wrote about Daniels in April appears to be “rhetorical hyperbole” and speech protected under the First Amendment. Daniels sued President Trump in April after he said a composite sketch of a man she said threatened her in 2011 to keep quiet about an alleged affair with the real estate mogul was a “con job.”

President Trump tweeted that the man was “nonexistent” and that Daniels was playing the “fake news media for fools.” He retweeted a side-by-side photo comparing the sketch with a photo of Daniels’ husband. “To allow the complaint to go forward and to have one consider this to be defamatory in the context it was made would have a chilling effect,” Otero said.

Attorney Ken White who blogs about the case and talks about it on the podcast “All the President’s Lawyers” said he thinks Otero wrote a tentative ruling that he would finalize an issue soon. Daniels’ defamation case bears resemblance to a ruling by a New York state judge who dismissed a lawsuit by a political strategist who claimed her reputation was trashed when Trump falsely said she had “begged” for a campaign job and called her a “dummy” on Twitter, White said.

“The court basically said, ‘It’s Trump, it’s Twitter, he’s known for throwing around insults and this can’t be understood as anything other than exaggerated rhetoric,’” White said of the New York case. Otero previously scheduled a hearing December 3 to discuss President Trump’s efforts to dismiss another lawsuit by Daniels over a hush-money agreement related to their alleged affair.

Daniels sued the president and his former personal lawyer, Michael Cohen, who negotiated the deal, so she could speak publicly about the sexual tryst without fear of reprisal. Cohen had threatened to sue her for $20 million. Lawyers for Trump and Cohen now say the deal that paid Daniels $130,000 to keep quiet was invalid and they won’t sue her for breaking it.

Daniels has said she had sex once with Trump in 2006 and carried on a friendship with him for about a year. The porn star previously claimed the agreement should be invalidated because Cohen signed it, however, President Trump did not. President Trump’s attorney said his client never considered himself as a party to the agreement and doesn’t dispute Daniels’ assertion that the contract is not valid.

While President Trump and Cohen want the court to toss out the litigation as moot, Daniels’ lawyer is eager to keep the case alive. Avenatti, who has frequently and aggressively criticized Trump in the news and has said he is considering challenging him in the 2020 presidential race, wants to take testimony from Trump about whether the deal was inked to silence Daniels while he was running for president.

Cohen has pleaded guilty to campaign finance violations for arranging payments to both Daniels and a former Playboy model to influence the election. Essential Consultants, the company Cohen set up to make the payment to Daniels, wants Daniels to return her $130,000 payment. Avenatti wants the defendants to pay his legal fees.

The Associated Press contributed to this report.