White House press secretary Sarah Huckabee Sanders said Wednesday it was “ridiculous” to accuse President Trump of lying after he reversed course on whether he knew about a $130,000 payment by his personal attorney, Michael Cohen, to adult-film star Stormy Daniels in the days before the 2016 election.

“I think that’s a ridiculous accusation,” Sanders said when asked whether the president had lied to the American people. “The president in this matter has done nothing wrong, and there are no charges against him.”

Her remarks came one day after Cohen pleaded guilty to eight violations of banking, tax and campaign finance laws, implicating Trump directly in some of his acts.

Cohen told the court he arranged to pay off two women to keep their stories of alleged affairs with Trump from becoming public before Election Day — in coordination with the then-candidate.

In April, Trump told reporters aboard Air Force One he did not know Cohen had paid Daniels to prevent her from revealing details of the alleged affair. Trump also said he did not know where Cohen had gotten the money to make the payment.

In an interview with “Fox & Friends” Wednesday, Trump shifted his explanation. He told Fox News Channel’s Ainsley Earhardt he had no knowledge of the payment at the time but learned about it after the fact.

“Later on I knew. Later on,” Trump said, adding the subsequent payments he made to Cohen to reimburse him “didn’t come out of the campaign, they came from me.”

Both Daniels and former Playboy model Karen McDougal have alleged they had sexual encounters with Trump, which he has denied.

In August 2016, McDougal was paid $150,000 by AMI, the parent company of the National Enquirer, for the rights to her story, which the company then shelved. In October 2016, Cohen used a home-equity line of credit to finance a $130,000 payment to Daniels.

Cohen said Tuesday Trump repaid him the money for the Daniels payment for the purpose of influencing the 2016 campaign.

Devlin Barrett, Carol D. Leonnig, Philip Bump and Renae Merle contributed to this report.