From left: President Donald Trump is seen during a meeting in the Oval Office on March 7, 2019, and director and actress Stormy Daniels attends the Adult Video News Awards in Las Vegas on Jan. 26, 2019. (Alex Edelman / Ethan Miller / Getty Images)

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 on Thursday tossed out porn actress Stormy Daniels’ lawsuit against President Donald Trump that sought to tear up a hush-money settlement about their alleged affair.

U.S. District Court Judge S. James Otero in Los Angeles said the suit was irrelevant after Trump and his former personal lawyer agreed not to penalize Daniels for violating a nondisclosure agreement she signed in exchange for a $130,000 payment.

Attorney Michael Cohen admitted in federal court he arranged the payment to silence Daniels and help Trump win the presidency. He pleaded guilty to campaign violations.

Trump has denied the alleged 2006 affair.

Daniels, whose real name is Stephanie Clifford, had wanted a court to declare the agreement illegal so she could speak out without fear of financial penalties if she violated it.

Correction: Judge tosses out NDA!

More than a year ago when I was being threatened with a 20 million lawsuit, I asked a judge to toss out this illegal NDA. Glad I stood my ground & kept fighting. https://t.co/Ra5iQerx9e — Stormy Daniels (@StormyDaniels) March 8, 2019

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

In seeking to dismiss the lawsuit, the president and Cohen effectively gave Daniels what she was initially seeking. They vowed not to seek penalties for breaking the deal.

Daniels had fought dismissal of the case because she wanted to record sworn testimony from the two.

Daniels’ attorney, Michael Avenatti, made no mention of that broader goal in declaring victory Thursday.

“The court found that Ms. Daniels received everything she asked for by way of the lawsuit — she won,” Avenatti said.

Yet again, lots of misreporting going on. Be clear: The Court specifically found that Stormy received everything she asked for in the lawsuit – she won. 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. — Michael Avenatti (@MichaelAvenatti) March 8, 2019

Avenatti had said he would seek legal fees in the case, but the judge said that was no longer an issue for him to decide. Otero sent the case back to Los Angeles Superior Court, where it was initially filed. He said that move does not mean the litigation would continue there, but said Daniels may be entitled to legal fees. Last year, Otero ordered Daniels to pay Trump $293,000 in attorney’s fees after dismissing a defamation lawsuit she brought against him. Attorney Charles Harder, who represents Trump, said the ruling on top of the previous award of fees represents a “total victory” for the president.