Special Counsel Robert Mueller’s office obtained search warrants to read Michael Cohen’s emails almost a year before the former fixer for President Trump was raided by the FBI, according to court documents unsealed Tuesday.

Beginning in July 2017, FBI agents working for Mueller sought and obtained three warrants to search Cohen’s communications. The request came two months and a day to Mueller’s appointment as leader of the Trump-Russia investigation, following Trump’s firing of FBI director James Comey.

After the emails were reviewed, Mueller’s office referred information to federal prosecutors in the Southern District of New York in February 2018. Two months later, SDNY prosecutors executed search warrants on Cohen’s residence, hotel room, cell phones, computers and safe-deposit box. Redacted versions of the warrants were unsealed on Tuesday as the result of media requests to see the materials.

Entirely blacked out is the warrant’s section about the “illegal campaign contribution scheme” that saw Cohen silence Trump’s purported mistresses during the 2016 election. Cohen and prosecutors say he paid off Stormy Daniels and Karen McDougal “in coordination and at the direction of” Trump.

With the evidence collected from Cohen, federal prosecutors in New York charged him with making illegal campaign contributions and a slew of financial crimes, including bank and tax fraud.

Cohen agreed to plead guilty to those crimes and began to distance himself from Trump, culminating in dramatic, marathon testimony before the House last month . The 52-year-old disbarred attorney will begin serving a three-year prison sentence in New York next month.