It’s happened: Donald Trump’s personal lawyer, Michael Cohen, admitted in open court Tuesday to violating federal campaign finance laws — at the direction of a candidate who told him to do so. Cohen is saying that Trump was a principal of the crime he admits to having committed. Under federal law, that makes Trump criminally liable as an accomplice.

The closest historical analogy is when Watergate special prosecutor Leon Jaworski named President Richard Nixon as an unindicted co-conspirator. That was based in part on testimony by John Dean, who had implicated Nixon in congressional testimony while Nixon was still in office. But even Dean’s 1973 guilty plea in court to obstruction of justice did not state that he had committed his crimes at the direction of the president.

This event is therefore unprecedented in U.S. history. Never before has someone pleaded guilty in open court and said he acted at the direction of the president. We are therefore entering into a new phase of the Trump presidency — one that will be complex and treacherous for the president and for the country.

When it became clear that Nixon was criminally liable for acts he had committed as part of the Watergate coverup, Congress initiated impeachment proceedings. Nixon soon resigned rather than face impeachment.

As president, Trump cannot be criminally charged under current Department of Justice guidelines. And he has shown no interest in leaving office.

In a rational world, Congress would wake from its torpor and get serious about investigating the president. Assuming Cohen is telling the truth — and he has no obvious reason to lie, and no promise of a reduced sentence — then-candidate Trump ordered a federal criminal violation in order to hide the fact that he was paying hush money to Stormy Daniels, a woman with whom he had an extramarital affair.

That’s a federal crime. Cohen is probably going to go to prison for following through on the order to violate campaign finance law. This suggests that Trump should be subject to criminal liability for giving the order.

Although he won’t be charged while he’s president, Trump could be charged with a federal crime the moment he leaves office. The prospect of criminal prosecution is therefore almost certainly going to loom over the rest of Trump’s term.

The best possible scenario for Trump is that the crime could be seen as technical. If the suggestions by Trump’s current lawyer, Rudy Giuliani, are to be believed, Trump was funneling the payment to Daniels through Cohen. If this is true, Trump was making an unauthorized and illegal campaign contribution to his own campaign. That’s a crime, but maybe not an earth-shattering one, if you already support Trump. Congressional leaders could see it the same way.

We would be faced with the bizarre scenario of a president, the nation’s chief law enforcement officer, who has been directly implicated in a federal crime — and suffers no legal consequences, at least while he’s in office.

As for impeachment, is directing the federal criminal violation a “high crime and misdemeanor” under the Constitution? It took place before Trump was in office, and it’s possible to argue that the crime was therefore not “high” because it wasn’t committed by President Trump but by candidate Trump.

Yet Trump’s alleged crime was connected to the presidency: According to Cohen, he committed it in order to get elected. This could arguably make it a “high” crime — high because it is tied to the office that Trump now holds. In any case, the ultimate definition of what is a high crime will be made by Congress

Congressional leaders of both parties now have to make a very tricky call about how to proceed. But the bottom line is this: Can the country tolerate having a president who has been directly implicated in violating the law?

Noah Feldman is a professor of law at Harvard University and was a clerk to U.S. Supreme Court Justice David Souter. His books include “The Three Lives of James Madison: Genius, Partisan, President.”