Updated

A federal judge in Los Angeles on Thursday dismissed ex-porn star Stormy Daniels’ lawsuit seeking to void a nondisclosure agreement with President Trump about an alleged affair.

Both sides claimed victory after the ruling, but the Los Angeles Times reported that Daniels, whose real name is Stephanie Clifford, may have to return a $130,000 payment from Trump’s ex-lawyer Michael Cohen.

Judge S. James Otero ruled in U.S. District Court that the suit was irrelevant after Daniels “received exactly what she wanted” when the president and his former personal lawyer agreed to rescind a nondisclosure agreement Daniels signed in exchange for a $130,000 payment, according to the Times.

“Combined with the attorneys’ fees and sanctions award in the president’s favor totaling $293,000, the president has achieved total victory,” Trump lawyer Charles Harder said, referring to Daniels’ defamation suit. That amount doesn't include the $130,000 payment.

Michael Avenatti, Daniels’ lawyer, also claimed victory after the ruling.

"How people can claim this is a 'loss' after we forced Trump and Cohen to cave and Cohen has been convicted, etc. is a mystery," he tweeted.

MICHAEL COHEN SUES TRUMP ORGANIZATION FOR MILLIONS

Daniels had wanted a court to declare the agreement illegal so she could speak out without fear of financial penalties if she violated the agreement.

Cohen said he arranged the payment to silence Daniels and help Trump win the presidency. Cohen pleaded guilty to campaign violations.

Trump has denied having an affair with Daniels.

The Associated Press contributed to this report