In a Lower Manhattan courtroom Tuesday, President Trump’s longtime attorney Michael Cohen directly implicated his former boss in a scheme to cover up alleged affairs Trump had with a former Playboy model and an adult film actress to prevent them from being revealed before the 2016 election.

Standing before Judge William H. Pauley III, Cohen admitted guilt on two criminal counts: willfully causing an unlawful corporate contribution and making an excessive campaign contribution.

The first count dealt with Cohen’s negotiation of an agreement with an unnamed company — the context of the government’s delineation of charges makes clear that it’s American Media Inc., publisher of the National Enquirer — to pay former Playboy model Karen McDougal $150,000. That payment was aimed at preventing her from being able to share her story of a year-long affair with Trump with any other media outlet.

The second count addressed the infamous payment to adult film actress Stormy Daniels, negotiated by Cohen shortly before the election. That payment, of $130,000, was made with funds drawn from a home equity line of credit obtained by Cohen in 2015. That line of credit was itself obtained fraudulently according to another of the guilty pleas Cohen entered on Tuesday.

To the layperson, this likely sounds as a slightly more noxious example of business as usual in politics. It’s not. Cohen made that very clear when he stood up to accept guilt for his actions, in two phrases.

The payment to McDougal was made “in coordination with and at the direction of a candidate for federal office,” he said, adding that it was made “for the principal purpose of influencing the election.” The Daniels payment was similarly made “in coordination with and at the direction of the same candidate” and for the same reason.

Those points are important. As we noted when the Daniels payment was first reported, making a payment of $130,000 to bury a story is of dubious legality in the abstract. How and if it violates the law depends on the relationship of the person making the payment to the campaign and whether such payments were in the standard course of practice of his business.

Cohen’s sworn assertions in court make clear that he was acting on behalf of the campaign with the aim of aiding the candidate’s election. This wasn’t Trump Organization attorney Michael Cohen making yet another payment to yet another woman — it was Cohen on behalf of the campaign making a campaign-related expenditure. Had the Trump campaign paid the $130,000 with legally contributed donations and reported it, it would have been perfectly legal, however politically problematic. It didn’t.

In fact, Cohen was repaid by the Trump Organization, according the government’s delineation of his crimes. Cohen, it reads, submitted a series of invoices to “a Manhattan-based real estate company” where he had once worked. Those invoices were meant, among other things, to repay him for the money he gave to Daniels and occurred over the course of 2017. Those payments were identified inside the company as being for a legal retainer.

The situation with the payment to McDougal is even more complex. The information document provided by the government walks through the details.

Prior to any agreements being signed, the chairman of AMI — Trump’s longtime friend David Pecker — allegedly “offered to help deal with negative stories about [Trump]’s relationships with women by, among other things, assisting the campaign in identifying such stories so they could be purchased and their publication avoided.” Over the course of the campaign Cohen “was able to arrange for the purchase of two stories so as to suppress them and prevent them from influencing the election,” those of McDougal and Daniels.

In June 2016, McDougal reached out to an AMI publication (presumably the Enquirer) through an attorney. AMI informed Cohen, who promised to repay AMI if it purchased her story for $150,000.

In August, the company agreed to do so. Later that month, Cohen reached an agreement to buy the rights from AMI for $125,000 — a potential purchase revealed in a conversation between Cohen and Trump that Cohen recorded. An agreement was signed and an invoice sent to Cohen but, in early October, Pecker told Cohen the deal was off. It’s not clear why, but in the same time period the “Access Hollywood” tape was published by The Washington Post.

A media outlet can buy stories and decide not to run them. But as we noted last month, when the existence of the Trump-Cohen recording was first reported, it can’t coordinate with the campaign to do so. The government document and Cohen’s assertions in court suggest that they did.

There’s a natural question that emerges here: Is Trump himself exposed to criminal liability for these payments? Setting aside the question of whether a prosecutor would seek an indictment against a sitting president or even whether such an indictment is possible, it’s a question worth answering.

Charlie Spies, who served as counsel for Mitt Romney’s 2008 presidential campaign, noted that Cohen’s admission of guilt didn’t necessarily mean that Trump was at risk. Trump could argue the expense was made for a personal purpose — to maintain his personal and professional reputation — rather than for a campaign purpose, he said.

Lawrence Noble, former general counsel for the Federal Election Commission, suggested that Trump’s actions put him at risk.

“If Trump on his own, or through Cohen, coordinated with AMI to buy her story to prevent it from coming out and hurting his campaign, then he solicited and accepted an illegal corporate contribution from AMI,” Noble said. That’s a violation of federal law.

Moreover, Noble noted, the reimbursement by the Trump Organization for the Daniels payment was itself problematic.

“If Trump authorized or coordinated the Trump Organization reimbursing Cohen for the Daniels payments,” Noble said, “then he is liable for the company making, and his campaign accepting, illegal corporate contributions.”

Richard Hasen, election law expert at the University of California at Irvine, agreed. Hasen said that Cohen’s violations could pose “liability on behalf of the campaign and liability on behalf of the Trump Organization, but there’s potential that Trump himself could be personally liable for conspiring to engage in this activity.”

“If the Justice Department were dealing with an ordinary case not dealing with the president, it sounds like he [Trump] could potentially be charged with a crime,” he added.

Cohen’s attorney Lanny Davis offered his thoughts on Twitter.

For months — more than a year — Trump has insisted that he is not implicated in the broad investigation into Russian interference in the 2016 election. His refrain of “no collusion” has became a go-to mantra meant to distance himself and his campaign from wrongdoing.

In court on Tuesday, his former attorney and “fixer” made clear that the Russia investigation is not Trump’s only worry.

Michelle Ye Hee Lee contributed to this report.