LOS ANGELES (AP) — A federal judge has thrown out a lawsuit against President Donald Trump by porn actress Stormy Daniels that sought to tear up a hush-money settlement about an alleged affair.

Judge S. James Otero ruled Thursday in U.S. District Court that the suit was irrelevant after Trump and his former personal lawyer agreed to rescind a nondisclosure agreement Daniels signed in exchange for a $130,000 payment.

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 the agreement.

Ex-Trump attorney Michael 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.

More about: