National Enquirer's chief David Pecker granted immunity by federal prosecutors in Michael Cohen case

Federal prosecutors granted David Pecker immunity in the Michael Cohen case.

David Pecker, a longtime friend of President Donald Trump and CEO of AMI, the parent company of the National Enquirer, was granted immunity by federal prosecutors in exchange for information about Michael Cohen, the president’s longtime fixer and personal attorney.

Cohen pleaded guilty this week to eight counts that included campaign finance violations spawned from hush money agreements with two women, Stormy Daniels and Karen McDougal, who claim to have had affairs with Trump.

The president has denied their accusations, either directly or through spokespersons.

Speaking to a packed federal courthouse in Manhattan earlier this week, Cohen said he made those payments "in coordination and at the direction of a candidate for federal office," referring to then-candidate Donald Trump.

In court papers filed Tuesday as part of Cohen’s guilty plea, prosecutors allege that a person identified as “Chairman-1,” who ABC believes to be Pecker, “offered to help deal with negative stories about [President 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” -– a process known as “catch and kill” that has shielded Trump from potentially damaging revelations.

After securing immunity, Packer told prosecutors in the Southern District of New York that he worked with Cohen on the McDougal and Daniels hush-money agreements and that Trump knew about the deals, a source told ABC News.

McDougal, a former Playboy Playmate, signed a $150,000 deal with AMI in August 2016 that transferred to the company the rights to her story of an alleged 10-month romantic affair with Trump in 2006.

The magazine never published her story.

McDougal alleged in a lawsuit filed earlier this year that Cohen had allegedly conspired with her former attorney to bury the story.

McDougal settled her lawsuit.

Cohen's guilty plea this week marked the end of a months-long investigation into his personal business practices, the genesis of which can be tied back to Mueller's investigation into Russian meddling during the 2016 campaign. Mueller referred the case to New York's Southern District to investigate.

In April, ABC News reported that a search warrant executed by federal investigators at Cohen’s home, office and hotel room for documents and records belonging to Cohen included specific mentions of “AMI,” according to two sources familiar with the warrant.

Federal agents also searched for information related to Cohen’s work for Trump, including records tied to secret deals with alleged mistresses, media organizations and the 2016 presidential campaign, sources told ABC News.

Cohen, whose guilty plea could land him a lengthy prison sentence, is scheduled to be sentenced in December.

The Wall Street Journal first reported Pecker's immunity agreement.

ABC News' James Hill contributed reporting.