David Pecker, the publisher of the National Enquirer, provided prosecutors with information about secret hush money payments to women who alleged having affairs with Donald Trump.

Prosecutors say Pecker helped Trump and his former lawyer Michael Cohen keep negative stories about Trump out of the media.

Cohen pleaded guilty to eight federal crimes on Tuesday, including those related to the payments intended to silence the women before the 2016 presidential election.

David Pecker, the publisher of the National Enquirer, provided federal prosecutors with information about secret hush money payments President Donald Trump's former personal lawyer Michael Cohen made to women who say they had sexual relationships with Trump, the Wall Street Journal reported on Wednesday.

On Thursday, the Journal reported that prosecutors granted Pecker immunity in the criminal investigation into Cohen, who pleaded guilty to eight federal crimes on Tuesday. Dylan Howard, the chief content officer of National Enquirer's parent company American Media Inc., will also be protected from charges.

Prosecutors say Pecker, a longtime friend of Trump's and a public supporter of his presidential bid, helped Cohen and Trump keep negative stories about the president out of the media by paying for stories and then never publishing them — a practice known as "catch and kill."

Cohen pleaded guilty in Manhattan federal court to five counts of tax evasion, one count of making a false statement to a financial institution, and two counts related to campaign-finance violations. Cohen said under oath that Trump directed him to violate campaign-finance laws just before the 2016 presidential election in order to boost his candidacy — a claim Trump has denied.

The latter two charges were in connection to a $150,000 payment to former Playboy model Karen McDougal and a $130,000 payment to porn actress Stormy Daniels to silence their stories of affairs with Trump. Prosecutors said Tuesday that Pecker and American Media Inc., were involved in the secret payments made to both women.

Pecker, AMI, and the Trump Organization were all subpoenaed as part of the government's investigation into the payments.