Michael Cohen, President Trump's personal attorney. (Pablo Martinez Monsivais/AP)

Harry Litman teaches constitutional law at the University of California at San Diego. He served as deputy assistant attorney general in the Justice Department from 1993 to 1998 and U.S. attorney for the Western District of Pennsylvania from 1998 to 2001.

Michael Cohen, that most loyal capo to the president, has marched into a minefield for his boss over the settlement with Stormy Daniels, with grave threats to his license, potential civil liability and even a tangible prospect of criminal charges.

Cohen’s lawyer told CNN’s Erin Burnett last week that Trump “was not aware of the agreement. At least Michael Cohen never told him about the agreement.”

Daniels has sued Trump and Cohen to set aside her hush agreement, and the lawsuit is proceeding in federal court in California. The story Cohen and Trump are taking into litigation, then, is that Cohen was a complete freelancer. He saw a problem for his friend and fixed it, paying with his own funds, while insulating Trump from any uncomfortable repercussions and safeguarding his deniability. Cohen never asked and never knew whether the affair occurred because that wasn’t relevant to him.

Also, of course, as he previously asserted, his actions had no political goals and nothing to do with the looming election, which was just a coincidence. He would have done the exact same thing any time because “I truly care about him and the family — more than just as an employee and an attorney.”

Trump will have no reason to contradict this account, which is designed to provide him maximum protection (and may even be true). So Cohen and Trump’s story has been locked in, and it’s fraught with legal peril.

First, Cohen’s radically blinkered stance sharply increases his exposure to civil liability for defamation of Daniels. Cohen has tried to be careful to leave the characterizations of Daniels’s claim to his own laywer, but he blundered at least once, publicly implying that Daniels’s account is false — a problem because his strategy requires being ignorant of the facts of the affair.

Second, the rules of professional responsibility are explicit that the lawyer can’t simply enter into a settlement that binds the client but “must promptly inform the client of its substance” unless the client has previously authorized it. In other words, only the client can approve a settlement. Cohen’s strategy thus entails an admission of serious professional malfeasance.

He might have also committed patent, and potentially criminal, fraud against Daniels. He induced her into a settlement agreement without disclosing that Trump had no knowledge of it and, therefore, couldn’t uphold his end of the bargain. The agreement assigns Trump certain obligations, including a release of all his claims against Daniels and a promise not to communicate with Daniels or her family. But how can Trump — who is referred to as a “party” in the agreement — have legally promised to undertake these obligations if he was never aware of them?

Such fraud, under contract law, would mean that the agreement was never properly formed. Certainly, a court or an arbitrator won’t take kindly to learning that an agreement it is being asked to enforce was, on this level, a sham.

Finally, Cohen’s insistence that the settlement — made less than two weeks before the election and three weeks after publication of Trump’s notorious comments about grabbing women’s genitals — had nothing to do with the election is, to put it mildly, suspect. The timing opens him to potential civil and criminal charges of making illegal campaign contributions.

The Justice Department wound up with egg on its face when it attempted to convict former senator John Edwards on a similar theory. But the facts in Edwards’s case were far less compelling: The payments to his mistress by wealthy friends were not in such a close shadow of an election.

In any event, the possibility of criminal charges would more than justify an effort by special counsel Robert S. Mueller III to further investigate, including grilling Cohen and exposing him to the possible jeopardy of lying to the government. So even as Trump faces grave new challenges in the Mueller probe — all without a credible lawyer to oversee a defense — storm clouds gather.

There is a path that could make most, if not all, of the problems go away: Cohen and Trump could change their story and cop to Trump’s having known about and approved the agreement in advance (which likely entails at least a tacit admission of the affair, unless Trump can somehow spin Daniels’s allegations as untrue but still damaging). Cohen would become Trump’s authorized agent, Trump would become a proper party to the agreement, and the agreement would become properly formed and executed. The election-law problems remain.

But that path would mean a political hit for Trump. So the question for both men is whether only Trump’s fortunes weigh on the scale. If Trump is the measure of all things, they may conclude that it’s better for Cohen to be thrown to the wolves than for Trump to absorb the cost of acknowledging the agreement.

It is hard to think of a more devoted figure in the president’s inner circle than Cohen. But will he hold steadfast to Trump, even at the potential cost of his license and liberty?