Trump team was devising plan to buy back all of the bad stories from Enquirer: Sources The AP said the tabloid had been collecting information since the 1980s.

Publishing mogul David Pecker has told federal investigators that he worked with President Donald Trump's longtime fixer and personal attorney Michael Cohen to buy and bury the stories of women claiming affairs with the billionaire -- and that Trump knew, sources told ABC News.

One of those women is Playboy Playmate Karen McDougal but Trump has denied the affair.

There was news Thursday, however, that the National Enquirer may have had a lot more dirt on Trump than just the McDougal story.

The tabloid had been collecting information on the president since the 1980s and that some of the material was kept in a locked safe, The Associated Press said last week.

Pecker, a longtime friend of Trump's, is also CEO of AMI, the parent company of the National Enquirer.

Pecker emptied the safe just before the inauguration, according to AP. It's unclear if he kept the documents, destroyed them or whether they're in the hands of federal investigators.

There was no comment from Pecker when ABC News reached him on the phone.

During the campaign, Trump and Cohen wanted to buy the contents of the safe themselves, The New York Times reported Thursday.

Just weeks before the election, Cohen secretly recorded a conversation with Trump and according to The Times, the two men seemed to discuss buying the Enquirer's Trump files from Pecker.

"I need to open up a company for the transfer of all of that info regarding our friend David," Cohen was heard saying in the recording, which ABC News independently obtained.

On the recording, Trump and Cohen sound worried that the information could fall into the wrong hands if Pecker left the Enquirer or worse.

"And it's all the stuff," Cohen says.

"... Thinking about that," Trump says.

"All the stuff because you never know where that company -- you never know where he's going to be," Cohen says.

"[INAUDIBLE] ...could get hit by a truck," Trump says.

"Correct. So I'm all over that," Cohen says.

That deal never went through and Trump has denied the women's accusations, either directly or through spokespersons.

Last week, Pecker was granted immunity by federal prosecutors in exchange for information in connection with the criminal investigation into Cohen and alleged hush-money payments.

Cohen pleaded guilty last week to eight counts that included campaign finance violations spawned from hush money agreements with two women, Stormy Daniels, who claims to have had an affair with Trump, and McDougal.

In court papers filed Aug. 21 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.

ABC News' Jim Hill contributed to this story.