Federal prosecutors said Tuesday, for the first time, that the National Enquirer played a pivotal role in silencing adult-film star Stormy Daniels about her alleged affair with Donald Trump during the 2016 election.

Those details emerged as Michael Cohen, the former fixer and personal attorney for Trump, pleaded guilty to tax evasion, bank fraud, and campaign-finance law violations in Manhattan federal court. Cohen faces years in federal prison after he’s sentenced on December 12.

The campaign-finance violations concern Cohen’s role in arranging hush-money payments for Daniels and ex-Playboy model Karen McDougal, who also said she had an affair with Trump. Prosecutors said these payments, which served to suppress damaging information about a candidate for federal office, were tantamount illegal campaign contributions to Trump.

In a news release detailing Cohen’s crimes, the U.S. Attorney’s Office for the Southern District of New York did not release the names of those who have not been charged with a crime, describing them with terms like Editor-1 and and Woman-2. But it is clear who they are from previously confirmed information about the Daniels and McDougal matters.

As previously reported, McDougal wasn’t paid directly by Cohen, but rather the Enqurier’s publisher, American Media, Inc. AMI paid the ex-Playboy playmate $150,000 in 2016 for her life rights, then did not publish her story, a practice known as “catch and kill.”

McDougal’s attorney was Keith Davidson, who went on to represent Daniels, an adult-film actress.

Previously unreported are the allegations, made here by prosecutors, that Davidson worked with the National Enquirer to also catch and kill Daniels’ story.

On October 8, 2016, Davidson informed Enquirer editor-in-chief Dylan Howard that Daniels was “willing to make public statements and confirm on the record her alleged past affair” with Trump, according to prosecutors. Howard and his boss, American Media, Inc. CEO David Pecker, “then contacted Cohen and put him in touch” with Davidson,” prosecutors said.

Over the next few days, Cohen and Davidson arranged a $130,000 agreement to purchase Daniels’ silence about her alleged affair with Trump.

But there was a catch, according to prosecutors.

“Cohen did not immediately execute the agreement, nor did he pay” Daniels. By October 25, Davidson told Pecker that Daniels was “close to completing a deal with another outlet to make her story public,” the feds said.

Howard then texted Cohen that “[w]e have to coordinate something on the matter [Davidson is] calling you about or it could look awfully bad for everyone.”

According to the prosecutors’ account, Pecker and Howard then called Cohen through an encrypted app, the feds write, before Cohen agreed to pay Daniels and called Davidson to finalize the deal.

The next day, prosecutors said, Cohen drew down $131,000 from a “fraudulently obtained” home equity loan and deposited it in a bank account he had opened in the name of a Delaware shell corporation, Essential Consultants LLC. The money was then wired to Davidson. After it was deposited, Davidson sent Cohen copies of the settlement agreement that silenced Daniels.

It was hush money, the feds said, and it was meant to help candidate Trump.

“Cohen caused and made the payments described herein in order to influence the 2016 presidential election,” they wrote. “In so doing, he coordinated with one or more members of the campaign, including through meetings and phone calls, about the fact, nature, and timing of the payments. As a result of the payments solicited and made by Cohen,” neither McDougal or Daniels “spoke to the press prior to the election.”

Prosecutors seized Cohen’s phones, computers, and documents during an April raid by FBI agents. Soon after, Davidson began reportedly began cooperating with federal investigators. Prosecutors subpoenaed AMI for records related to Cohen’s work in paying off McDougal.

AMI and Davidson did not immediately respond to a request for comment.

— Victoria Bekiempis contributed to this report.