Donald Trump has denied any knowledge of the hush payments.

Documents released by a judge's order on Thursday detailed a flurry of communications involving Donald Trump, his campaign team, personal lawyer Michael Cohen and others to engineer hush-money payments shortly before the 2016 election to an adult-film actress who said she had a sexual encounter with the president.

U.S. District Judge William Pauley in Manhattan on Wednesday had ordered that the material, used by prosecutors to obtain a 2018 search warrant for Cohen's home and office, be unsealed on Thursday morning. The judge found there was no reason to keep the documents secret after prosecutors told him that their investigation into the payments had ended.

Cohen, 52, pleaded guilty in August 2018 to violating campaign finance law by directing payments of $130,000 to porn star Stormy Daniels and $150,000 to Playboy model Karen McDougal to avert a scandal shortly before the 2016 presidential election. Both women have said they had sexual encounters with Trump more than a decade ago and that the money was meant to buy their silence. Trump has denied the encounters and in 2018 told reporters he knew nothing about a payment to Daniels.

The documents reveal frequent phone calls and text messages involving Cohen, Trump staffers and American Media Inc, the publisher of the National Enquirer tabloid newspaper, in a bid to prevent Daniels' account of a relationship with Trump from harming his election chances. Trump took part in some of the calls, the documents showed. One text from Cohen apparently described Trump as "pissed."

The search warrant application described a phone call on Oct. 8, 2016, about a month before the election, involving Trump, Cohen and Hope Hicks, then the press secretary for Trump's presidential campaign, which prosecutors believed was to discuss paying to squash public reports of an affair between Trump and Daniels.

FLURRY OF CALLS

A few minutes after that call, Cohen called David Pecker, the president of American Media Inc who was close to Trump, and then received a call from another employee at AMI, which published the National Enquirer tabloid newspaper. A short time later, Cohen called Hicks back for about two minutes. Calls between the Trump campaign, AMI and Cohen continued through the evening.

Prosecutors said these calls were to discuss getting a payment to Keith Davidson, then an attorney for Daniels.

On Oct. 17, 2016, Cohen was involved in calls and texts as he feared the attempted settlement agreement might fall apart, according to the warrant application.

The documents indicated that Dylan Howard, chief content officer at AMI, believed Daniels might be trying to sell her story to a news outlet after all.

"I'm told they're going with DailyMail," Howard wrote in a text to Cohen late that afternoon, referring to a British tabloid. "Are you aware?" The pair quickly got on the phone. Cohen tried to call Trump but appears to have been unsuccessful, the documents showed.

The negotiations continued with Cohen communicating multiple times on Oct. 26 with Daniels' lawyer and the two AMI executives, Pecker and Howard, the documents showed.

The following morning Cohen called Trump and spoke with him for about three minutes, and then soon after made a second call for about 90 seconds to Trump, the documents showed. Less than 30 minutes later, Cohen sent emails to a person who had set up the limited liability companies through which the payment funds were handled, asking that he be sent "the filing receipt" as soon as possible, the documents showed.

After meeting with a bank representative from First Republic Bank at Trump Tower that day, Cohen transferred $131,000 out of a home equity line of credit that Cohen had at First Republic, which prosecutors said was used to pay Daniels.

MORE TRUMP-COHEN CALLS

Before the payoff negotiations began, Cohen spoke on the phone with Trump about once a month and rarely had phone contact with his campaign staff, the search warrant said.

Beginning on Oct. 8, there was a surge in calls with Trump and his campaign staff as Cohen conducted negotiations with Daniels' lawyer and the two AMI executives, it showed. Amid these negotiations, Trump spoke with Cohen at least five times on the phone through to Oct. 28. The warrant shows Cohen repeatedly speaking on the phone with Hicks, one of Trump's closest aides who later worked in the White House.

Hicks testified before the House Judiciary Committee earlier this year that she was never present for any discussion during the campaign between Trump and Cohen about Daniels.

The documents explain more about the role of Hicks, who spoke with Cohen several times about the importance of keeping the Daniels and McDougal stories from "gaining national traction." Not long after the Wall Street Journal published an article online four days before the Nov. 8 election, the documents showed Cohen sent a text message to Hicks saying the article was getting "little to no traction," prompting her to respond: "Same. Keep praying!! It's working!"

On the same day as that text, Howard texted Cohen about the Wall Street Journal story, saying, "I think it'll be ok pal. I think it'll fade into the distance," the documents showed. Cohen responded, "He's pissed," an apparent reference to Trump, according to the documents.

Cohen, who was once Trump's self-described "fixer," began serving a three-year prison sentence in May for his campaign finance violations and other crimes, including making false statements to a bank and tax evasion.

Cohen pleaded guilty last November to separate charges brought by the office of former Special Prosecutor Robert Mueller, who was investigating contacts between Trump's 2016 presidential campaign and Russia. Cohen admitted he lied to Congress about the extent of contacts between Trump and Russians during the campaign.

The White House did not respond to a request for comment. AMI and a lawyer for Hicks did not immediately respond to requests for comment.