The FBI told a federal judge that President Donald Trump was personally and directly involved in the hush money payments to Stormy Daniels, according to year-old court documents fully revealed on Thursday.

Throughout an 18-page, previously redacted section of an April 2018 search warrant application, an unnamed FBI agent alleged how Trump directed and oversaw the effort to buy Daniels’ silence about an affair.

The FBI’s search warrant application brims with Trumpworld figures like his campaign press secretary Hope Hicks and campaign manager Kellyanne Conway, as it recounts what investigators believed they knew as they attempted to convince a judge to let them raid the President’s personal attorney.

Initial discussions about a scheme to funnel hush money to Daniels appear to have begun amid panic within the Trump campaign following the publication of the Access Hollywood tape.

The FBI alleged that “in the days following the Access Hollywood video, Cohen exchanged a series of calls, text messages, and emails” with Trump, Hicks, National Enquirer publishers David Pecker and Dylan Howard, and Keith Davidson, Daniels’s attorney.

On the evening of Oct. 8, Cohen, Trump, and Hicks had a phone call, the FBI alleged. The FBI agent was able to identify Trump’s participation on the call from his phone number, based on phone records that the U.S. Attorney’s Office obtained.

Throughout that evening, the FBI alleged, Cohen called others, including the National Enquirer publisher American Media, Inc. officials. There appear to be at least eight phone calls between Cohen, Hicks, and AMI officials during that one day.

After these calls, the FBI alleged it had information showing that Cohen “called Trump, and they spoke for nearly eight minutes.

Throughout the month of October, Cohen continues to speak with Trump, according to call records that the FBI relies on in the search warrant application.

On the morning of Oct. 26, for example, Cohen spoke with Trump twice over the phone.

The FBI alleged that “less than thirty minutes after speaking with Trump,” Cohen emailed the person who incorporated two companies he created that were involved in the hush money scheme. Cohen then went to First Republic bank, where he opened the bank account for Essential Consultants, the firm that was used to pay Daniels $130,000 in hush money.

By Oct. 27, the hush money had been to Daniels. The morning after, the FBI alleged, Trump and Cohen spoke over the phone again.

The FBI alleged that Cohen connected with Kellyanne Conway, then manager of Trump’s campaign.

The two spoke over the phone on the same day that Davidson, Daniels’s attorney, wired $96,645 to his client, the FBI alleged. The same day, Cohen received an audio statement from Daniels in which she cast doubt on similar allegations made by another porn star.

After an initial failed call attempt, the FBI alleged, Conway managed to reach Cohen, with the pair speaking for “approximately six minutes.”

But the scheme failed to keep Daniels’s story out of the news before election day. The Wall Street Journal got the scoop on Daniels’s affair with then-candidate Trump, publishing a story on the evening of Nov. 4 detailing the allegations.

Cohen and Howard texted furiously in the lead-up to the story’s publication, the FBI alleged.

“I think it’ll fade into the distance,” AMI Chief Content Officer Dylan Howard texted Cohen before the article’s publication.

Cohen replied: “He’s pissed.” The FBI wrote that it believed “Cohen was referring to Trump” in the text.

“I”m pissed! You’re pissed. Pecker is pissed. Keith is pissed. Not much we can do,” read Howard’s response.

After the article was published, Cohen and Hicks monitored coverage of the story, rejoicing in the supposed “little to no traction” that the story initially received.

The next line of the search warrant application noted Trump’s election.

Judge William Pauley ordered the documents unsealed on Wednesday, denying a request from prosecutors for redactions that would have obscured the identities of certain third parties in the case.

Other elements of the search warrant application suggested that the FBI’s investigation into the case proceeded cautiously, in part due its “covert” nature.

The FBI cited an email from within the Trump Org published by the Washington Post, but then wrote that it did not obtain the message itself because the probe’s “partially covert nature” led it not to request information from the Trump Org.

Cohen pleaded guilty to eight counts – including two campaign finance violations – in August 2018, before pleading guilty to a separate charge of making false statements before Congress in a November case brought by the Mueller investigation.