A federal judge dismissed a lawsuit against President Trump Donald John TrumpOmar fires back at Trump over rally remarks: 'This is my country' Pelosi: Trump hurrying to fill SCOTUS seat so he can repeal ObamaCare Trump mocks Biden appearance, mask use ahead of first debate MORE from adult-film actress Stormy Daniels over a hush-money settlement on Thursday.

Central District of California Judge S. James Otero ruled that the suit was irrelevant after Trump and his former lawyer Michael Cohen Michael Dean CohenA huge deal for campaign disclosure: Trump's tax records for Biden's medical records Our Constitution is under attack by Attorney General William Barr Eric Trump says he will comply with New York AG's subpoena only after Election Day MORE agreed to rescind a nondisclosure agreement Daniels signed in exchange for a $130,000 payment, The Associated Press reported Thursday.

ADVERTISEMENT

Daniels alleges that she had an affair with Trump in 2006 and was seeking to have the settlement declared illegal so that she could speak up about that affair without fear of financial penalties.

Trump has denied any affair with Daniels.

Cohen said he arranged the payment to silence Daniels to help Trump win the presidency in 2016.

That hush money payment is one of the reasons Cohen was sentenced last year to three years in jail for bank fraud and campaign finance violations.

Trump has repeatedly said he was not involved in the payment.

The Hill has reached out to the White House for comment.

Daniels' attorney Michael Avenatti claimed victory in a statement to the Hill.

"The Court found that Ms. Daniels received everything she asked for by way of the lawsuit - she won," he said.

Updated at 7:24 p.m.