Just ask John Edwards’ prosecutors.

This piece was originally published on Just Security, an online forum for analysis of U.S. national security law and policy.

This week, Michael Cohen pleaded guilty to eight crimes—six counts of tax evasion and bank fraud, and two violations of campaign finance laws: (1) making an illegally large $130,000 campaign contribution and (2) causing an illegal $150,000 corporate campaign contribution. In the process of pleading guilty, Cohen directly implicated President Donald Trump in violations of campaign finance laws—violations of the sort that led to an unsuccessful criminal prosecution of 2008 presidential candidate John Edwards. The case against Trump is much stronger than was the case against Edwards. Indeed, the case against Trump would turn the weaknesses in Edwards’ case into strengths.

But first a little more about Cohen and the implications for Trump.

The Important Facts and How the Law Works

One of Cohen’s campaign finance violations relates to his use of his own money to make a $130,000 “hush” payment to adult-film actress Stephanie Clifford (aka Stormy Daniels) in October 2016. Cohen’s other campaign finance violation relates to his collaboration with tabloid publishing corporation American Media Inc. in its $150,000 “catch and kill” payment to former Playboy model Karen McDougal in August 2016. Both women claim to have had affairs with Trump a decade before receiving payments from Cohen and AMI.

Cohen’s guilty plea didn’t surprise me. I spotted these violations early this year, and on behalf of the nonpartisan group Common Cause, we filed complaints with the Department of Justice and Federal Election Commission in January regarding the Clifford payment, in February regarding the McDougal payment, and another one in March regarding the Clifford payment. These complaints included allegations that Cohen made an illegal $130,000 contribution and AMI made an illegal $150,000 contribution to the Trump campaign. Common Cause also alleged violations by Trump, the Trump campaign, and the Trump Organization—allegations that seem even more well-founded after the Cohen guilty plea.

What did surprise me, however, were the statements Cohen made during his court appearance to enter his plea agreement. Cohen told the presiding judge under oath that the payments to Clifford and McDougal were made “in coordination with and at the direction of a candidate for federal office,” a clear reference to then-candidate Trump. Cohen stated further: “I participated in this conduct … for the principal purpose of influencing the election” for president in 2016. These sworn statements by Cohen directly implicate the president in at least four violations of federal campaign finance law, which are criminally enforced, and potentially other federal offences.

There’s added reason to trust what Cohen said in the courthouse compared with what he may have previously told the press. He made these claims under penalty of perjury. He also made the statements pending sentencing. Lying to or even just misleading the judge in that situation could have dire consequences for the amount of time he spends in prison. Lastly, if prosecutors had reason to think Cohen’s statement was false, they were under an obligation to inform the judge immediately. They didn’t.

A violation of campaign finance law is a crime punishable by imprisonment, as opposed to a civil offense punishable only by fine, if an individual’s violation of the restrictions was knowing and willful. As explained in the Department of Justice manual Federal Prosecution of Election Offenses, federal campaign finance law violations “become potential crimes when they are committed knowingly and willfully, that is, by an offender who knew what the law forbade and violated it notwithstanding that knowledge.” That’s an important qualification to keep in mind. It means that not having knowledge of the law is, in some sense, an excuse or get-out-of-jail-free card in this arena. And it is prosecutors who would have the burden of proving beyond a reasonable doubt that a defendant acted with this state of mind.

The Prosecution of John Edwards Versus the Case Against Trump

Cohen’s statements in court this week, if true, establish that Trump was personally involved in multiple violations of federal law and also severely undermine the viability of what I’ll call the “Edwards defense,” which Trump lawyer Rudy Giuliani has already publicly asserted on Trump’s behalf.

Federal prosecutors charged 2008 Democratic presidential candidate John Edwards for allegedly orchestrating nearly $1 million in payments by two wealthy Edwards supporters to hide his pregnant mistress, Rielle Hunter, from public view in the latter half of 2007. The Department of Justice argued that the payments to Hunter constituted illegally large and unreported in-kind contributions to the Edwards campaign. Sound familiar? Edwards argued that the purpose of the payments was to hide his affair from his wife, who was battling cancer at the time, not to hide his affair from voters. In other words, Edwards claimed the reason for the payments was personal and not political.

Some commentators claim that Edwards was vindicated and that his case shows that his alleged activities would not amount to a crime. That’s wrong. The jury was unable to reach a unanimous conclusion on five of the six counts Edwards faced, and acquitted him on a count related to a payment made after he had dropped out of the presidential race. The law is still a strong one that regulates all federal elections. The failure of Edwards’ prosecution boils down to weaknesses in some of the claims the government made and evidence against him.

Indeed, Common Cause has alleged very similar violations of law by Trump in our DOJ and FEC complaints. Specifically, we allege that Trump violated federal law by receiving illegal contributions from Cohen and AMI in the form of payments made to McDougal and Daniels, and by failing to report these contributions to the FEC.

These campaign finance laws apply only to payments made “for the purpose of influencing an election,” a phrase that’s critical to the statutory definitions of “contribution” and “expenditure.” Several factual distinctions make the case against Trump stronger than was the case against Edwards, specifically with respect to any asserted “personal not political” defense.

1. Fear of media exposure

First, in the Edwards prosecution, DOJ presented no evidence that Hunter was planning or threatening to speak to the press about her affair with Edwards. Edwards’ lawyers made a big deal out of this at trial, arguing that the payments were intended to keep news of Edwards’ affair from his very-ill wife, not from the voting public. By contrast, regarding the payments at issue in the Trump/Cohen matter, both McDougal and Clifford were in negotiation with national media outlets to sell the rights to their stories of affairs with Trump. McDougal and Clifford understood that the rapidly approaching presidential general election gave them leverage over Trump. These facts are highly relevant to the motive and purpose of the payments.

2. Timing of payments and the election

Second, all but one of the payments made to Hunter on behalf of Edwards were made before a single primary ballot had been cast, in the calendar year preceding the election year. The one exception was a late January 2008 payment after Edwards had dropped out of the presidential race—the count on which he was acquitted. By contrast, the two payments related to Cohen’s guilty plea came in August (McDougal) and October (Clifford) of the election year, immediately before Americans voted in the general election. This timing is relevant to the likely purpose of the payments. (It may be useful to recall that Trump’s own lawyer Giuliani admitted this was the purpose of the Daniels payments in discussing its timing.)

3. Timing of the payments and the affairs

Third, the payments to Hunter on behalf of Edwards were made contemporaneously to the affair and the pregnancy—timing that arguably makes sense if the true purpose was to keep knowledge of the affair from Edwards’ wife. By contrast, the payments to both McDougal and Clifford were made a decade after the alleged affairs—timing that doesn’t make much sense if the purpose was to keep knowledge of the affairs from Mrs. Trump but makes a lot of sense (combined with the proximity to the election) if the purpose was to keep the information from voters in order to influence the election.

4. Witnesses

Finally, whereas the sources of allegedly illegal payments in the Edwards prosecution were unavailable to testify at trial regarding the purposes of their payments (Fred Baron died in 2008 and Rachel “Bunny” Mellon was 101 years old and unable to travel and testify), Michael Cohen, the source of one of the Trump-related payments, stated in court this week that his payment was “for the principal purpose of influencing the election.” Cohen’s plea documents indicate a host of other people were involved in the scheme. According to the Wall Street Journal, one of those individuals, the president of AMI has already “provided prosecutors with details about payments … including Mr. Trump’s knowledge of the deals.”

To be clear, I don’t mean to imply that a criminal prosecution of President Trump for campaign finance violations would be an easy case—or that it could be done at all. Some of the sharpest legal minds in the nation disagree over whether a sitting president can be prosecuted for any crimes while he remains in office. And even if prosecution were possible, conviction would require proof that Trump knew his actions were forbidden by law and violated the law notwithstanding that knowledge.

Instead, I detail these factual distinctions between the Edwards and Trump matters to push back on the assumption that because Edwards wasn’t convicted, Trump’s actions didn’t violate the law or that federal prosecutors would not have a formidable case against him. Trump may not be held accountable for his actions in a court of law, but that doesn’t mean he didn’t break laws getting elected in 2016. That’s a matter for the court of public opinion. And the case against Trump is strong.