The FBI believed then-candidate Donald Trump was closely involved in a scheme to hide hush-money payments to adult film star Stormy Daniels, who claimed to have had an affair with Trump, court documents from the closed campaign finance case against former Trump-fixer Michael Cohen show.

The documents, released Thursday, describe a “series of calls, text messages, and emails” among Cohen, Trump, Trump campaign aide Hope Hicks, Keith Davidson — an attorney for Daniels, whose legal name is Stephanie Clifford — and David Pecker, an executive of the company that published the National Enquirer.

“I have learned that in the days following the Access Hollywood video, Cohen exchanged a series of calls, text messages and emails with Keith Davidson, who was then Clifford’s attorney, David Pecker and Dylan Howard of American Media Inc. (“AMI”), the publisher of the National Enquirer, Trump, and Hope Hicks, who was then press secretary for Trump’s presidential campaign,” an FBI agent investigating the matter wrote in the released documents.

“Based on the timing of these calls, and the content of the text messages and emails, I believe that at least some of these communications concerned the need to prevent Clifford from going public, particularly in the wake of the Access Hollywood story,” the agent said.

The unsealed documents say Hicks called Cohen at 7:20 p.m. on Oct. 8, 2016 — the first time she had called him in weeks — and that Trump joined the call seconds later. The conversation lasted four minutes. Hicks and Cohen spoke privately after Trump left the call and, after that, Cohen phoned Pecker. Moments after that conversation ended, Cohen received a phone call from Howard, the chief content officer of American Media. After that call, Cohen rang Hicks back, ended that call, and then took another from Pecker. At 8:03 p.m., according to the unsealed court documents, Cohen called Trump. They spoke for eight minutes.

Download the NBC News app for breaking news and politics

The two would speak again Oct. 26, the day when Cohen would wire $130,000 to an escrow account that would eventually be sent to Daniels' attorney as payment for the agreement to secure her silence. The first call was at 8:26 a.m. for three minutes, and the second came at 8:34 a.m.

The last phone call between Trump and Cohen described in the documents took place at 11:48 a.m. on Oct. 28 and lasted about five minutes. Later that day, Cohen's and Daniels' attorneys confirmed that the paperwork for the agreement for Daniels' silence was complete.

The FBI agent wrote in the document that the information came from a review of Cohen's telephone records and under warrants to obtain Cohen’s emails. In addition, the documents say the FBI questioned Hicks about her involvement.

In a statement from jail, Cohen said, "As I stated in my open testimony, I and members of the Trump Organization were directed by Mr. Trump to handle the Stormy Daniel' matter, including making the hush-money payment."

"The conclusion of the investigation exonerating the Trump Organization's role should be of great concern to the American people and investigated by Congress and the Department of Justice," Cohen said.

He added that a statement a day earlier from Jay Sekulow, Trump's personal attorney, was "completely distorted and dishonest."

Cohen's attorney, Lanny Davis, accused Sekulow of having "issued a misleading and false statement" and asked him to answer two questions.

"Is it not a fact that SDNY prosecutors found President Trump to have directly and coordinated the commission of felony involving campaign finance federal laws?" Davis wrote in a statement. "Is it not also a fact that upon his loss of purported immunity as President of the United States, he is subject to arrest, incarceration and trial for that trial?"

On Wednesday, Sekulow said, "We are pleased that the investigation surrounding these ridiculous campaign finance allegations is now closed," adding, "We have maintained from the outset that the president never engaged in any campaign finance violation."

The release of the previously redacted documents comes a day after the federal judge in the case disclosed that prosecutors had concluded their probe into Cohen’s campaign finance crimes and ordered the release of search warrants tied to the case.

Cohen, Trump's former lawyer and fixer, is serving a three-year prison sentence for a slew of crimes, including breaking campaign finance laws by hiding payments to Daniels and another woman who also claimed she had an affair with Trump.

"The campaign finance violations discussed in the materials are a matter of national importance," Judge William Pauley III said in court papers, denying the government's request for limited redactions. "Now that the government’s investigation into those violations has concluded, it is time that every American has an opportunity to scrutinize the materials."

Last August, Cohen admitted to making the illegal payments to Daniels and former Playboy model Karen McDougal at Trump's behest to silence them ahead of the 2016 election.

Trump has denied the affairs.

The New York probe has long been viewed as potentially perilous for Trump and his associates. The judge's disclosure is the clearest indication yet that federal investigators have concluded their investigation of possible campaign finance crimes involving Cohen and likely any of Trump's other business associates or family members.