The Stormy Daniels affair appears to be growing more complex by the day—with its dueling lawsuits and contradictory claims—but one central fact appears beyond dispute: On the eve of the 2016 presidential election, attorney Michael Cohen paid the former porn star $130,000 in hush money, so that she would stay silent about her alleged affair with his client, Donald Trump. Given the timing, the payoff to Daniels looks a lot like an unreported campaign contribution, which would constitute a crime under U.S. law, but Cohen insists that he simply paid the money from the goodness of his heart.

That might seem like a pretty shaky defense, even if Cohen really used his home equity line to get the funds as he claims, but it turns out to be no defense at all. Cohen should be in hot soup either way.

As a New York lawyer, Cohen is required to follow Rule 1.8 of New York’s Rules of Professional Conduct, which provides that “While representing a client in connection with contemplated or pending litigation, a lawyer shall not advance or guarantee financial assistance to the client.” There are some exceptions for indigent clients, which are obviously inapplicable to Trump, so the only real issue is whether Cohen’s payment was made in connection with litigation. If so, it is pretty clear that Cohen has violated his state’s legal ethics rules.

We know, of course, that Daniels’s Nondisclosure Agreement has ultimately ended up in court, but that is not the question. The real issue is whether the payment, when made, was related to litigation, rather than, say, a contract or other transaction.

Fortunately, the NDA—which uses the pseudonyms PP and DD for Daniels and Trump—was appended to Daniels’s current lawsuit, so we can turn to the document itself for more relevant information. According to Paragraph 2.2, “PP claims that she has been damaged by DD’s alleged actions against her, including but not limited to tort claims.” Paragraph 2.5, meanwhile, explains that “The Parties wish to avoid the time, expense, and inconvenience of potential litigation, and to resolve any and all disputes and potential legal claims which exist or may exist between them.”

It doesn’t take a lawyer to recognize that that Trump-Daniels agreement “contemplated” litigation, which means that Cohen’s “financial assistance” was prohibited under the New York ethics rules.

Cohen probably won’t have to worry much about the election law violation, which can only be prosecuted by the U.S. Department of Justice. The Daniels affair is unrelated to the Russia probe, which means that Attorney General Jeff Sessions is not recused and Special Counsel Robert Mueller won’t likely be looking into it. Sessions is already on thin ice with Trump, so the chances that he will indict his boss’s attorney are pretty much nil.

The New York bar authorities, however, are not under the control of the White House, and they have no reason to ignore Cohen’s evident flouting of the ethics rules. Other New York lawyers have been disciplined for simply making loans to struggling clients in tort-related cases, and the same has happened in other states (all of which have similar rules). A disciplinary complaint by the Attorney Grievance Committee —which could lead to suspension or disbarment—might well cause Cohen to be more fully candid about the precise origin of the funds for the Daniels payoff.

Of course, Cohen might decide that he has to stop answering questions about the NDA, given the attorney-client privilege, but the New York Rules of Professional Conduct address that possibility as well. According to Rule 1.6, a lawyer may disclose confidential information in order to defend himself “against an accusation of wrongful conduct,” meaning either a crime or an ethics violation.

Cohen could clear himself completely if it turns out that he was just a conduit for payoff money from Trump himself—and thus there was neither a campaign contribution nor any “financial assistance”—but his loyalty to his client runs deep. He was purportedly willing to mortgage his house to keep Trump’s alleged dalliances under wraps, but will he be willing to keep mum at the risk of his law license? For now, the hush money can only be characterized as an unlawful campaign contribution or prohibited financial assistance to a client. Unless he has a better explanation, it looks as though Michael Cohen may find himself, like other Trump enablers, left twisting in the wind.