This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A federal judge appeared inclined Tuesday to toss out a lawsuit against President Donald Trump by porn actress Stormy Daniels that sought to tear up a hush-money settlement about their alleged affair.

Trump and his former personal lawyer asked a judge to dismiss the lawsuit after agreeing to rescind a nondisclosure agreement that included a $130,000 payment to Daniels.

Judge S. James Otero did not rule in U.S. District Court, but he seemed to agree with lawyers for the president and Michael Cohen that there were no longer grounds for a lawsuit.

“It seems you’ve achieved … what you sought to achieve,” Otero said to Daniels’ attorney.

If Otero does throw out the case, it would give both sides a chance to claim victory.

The case would allow Daniels to speak without threat of legal consequences, but it would also prevent further litigation she has sought to force the president and Cohen to give sworn testimony.

Daniels, whose real name is Stephanie Clifford, brought the lawsuit to free herself from the agreement that silenced her as the 2016 presidential campaign reached its conclusion.

Cohen had arranged the payment and later pleaded guilty to campaign violations after admitting the deal was struck to help Trump prevail in the presidential contest.

Trump has denied the alleged 2006 affair.

Daniels had claimed the agreement was not valid because Trump’s signature was not on it and the president’s lawyer has said he was never party to the settlement.

Despite appearing to get what Daniels originally sought — dismissal of the agreement she disregarded long ago in speaking to news media and writing a book — her lawyer fought hard to keep the case alive.

Attorney Michael Avenatti, who once toyed with making a presidential run to take on Trump, wanted the case to continue so he could force Trump and Cohen to give depositions.

But the judge wasn’t buying Avenatti’s legal reasoning for keeping litigation going when there was no longer an issue in dispute.

Otero repeatedly asked Avenatti to cite case law to support his arguments. But after he named several cases, Otero told him he was “mixing apples and oranges.”

“I think we see the issues very differently,” the judge said.

During those exchanges, Trump’s attorney, Charles Harder, had a smirk that appeared to keep growing.

Still, Avenatti declared his client the winner after Tuesday’s hearing.

“They admitted what we said all along,” Avenatti said. “So any attempt by anyone to claim that this is not a victory for Stormy Daniels is completely bogus and nonsense and dishonest.”

Essential Consultants, the company Cohen set up to handle the deal, had once sought to fight Daniels in arbitration for violating the nondisclosure agreement by speaking in public about the affair. Cohen had even threatened a $20 million lawsuit against her.

Cohen didn’t follow through with those legal actions after seeking to dismiss the lawsuit, but he had said he would seek repayment of the $130,000.

Cohen’s lawyer, Brent Blakely, said Tuesday he wouldn’t seek repayment of that money.

Avenatti said he would seek legal fees regardless of how Otero rules on dismissal of the case.

Last month, Otero ordered Daniels to pay Trump $293,000 in attorney’s fees after dismissing a defamation lawsuit she brought against him.