Newly unsealed court documents on Thursday revealed the origins of a federal investigation into Michael Cohen that landed President Donald Trump‘s former personal lawyer in prison and show that Trump had knowledge of hush money payments made to his mistresses in the weeks before the 2016 election.

In May, Cohen started his three-year prison sentence for campaign finance violations that included these hush money payments. He was also charged with lying to Congress and for bank and tax fraud. Cohen’s plea deal with the Southern District of New York identified Trump as “Individual-1,” and added the president ordered his personal attorney to make the illicit campaign payments.

A search warrant affidavit unveiled Thursday states that Cohen, Trump and former White House Communications Director Hope Hicks were on a phone call together in October 2016 that federal officials believe “concerned the need to prevent” adult film star Stormy Daniels from publicly speaking about her alleged sexual affair with Trump.

An unnamed FBI official wrote in the affidavit that this phone call occurred just one day after the infamous Access Hollywood tape leaked that showed Trump boasting about sexually assaulting women on a bus with Billy Bush in 2005.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

The search warrant states that Cohen exchanged several different types of communications with Trump, Hicks, Daniels’ then-lawyer and with American Media Inc. executives David Pecker and Dylan Howard.  

After the Wall Street Journal first revealed the scandal surrounding the hush money payments to Daniels in an article published in early 2018, Cohen and Hicks exchanged messages.

“So far I see only 6 stories. Getting little to no traction,” Cohen wrote. “Same. Keep praying!! It’s working!” Hicks wrote. “Even CNN not talking about it. No one believes it and if necessary, I have a statement by Storm denying everything and contradicting the other porn stars statement. I wouldn’t use it now or even discuss with him as no one is talking about this or care!”

In a letter, U.S. District Judge William P. Hauley ordered that search warrants and other documents related to Cohen’s case be unveiled with few redactions. Cohen’s home and offices were famously raided in April 2018 for materials tied to the controversy surrounding the hush money payments. Cohen also testified before Congress about his work for Trump over the course of more than a decade in February.

“The campaign finance violations discussed in the Materials are a matter of national importance,” Pauley wrote. “Now that the Government’s investigation into those violations has concluded, it is time that every American has an opportunity to scrutinize the Materials.”

Many Republican lawmakers have said they believe Cohen is dishonest in the wake of his testimony about Trump.

Here is the full search warrant:

Michael Cohen search warrants by RawStory on Scribd