Michael Cohen, US President Donald Trump's former personal attorney, arrives to testify in a closed session before the House Intelligence Committee at the US Capitol in Washington, DC on March 6, 2019.

Special counsel Robert Mueller obtained a search warrant targeting President Donald Trump's then-personal lawyer Michael Cohen emails in the summer of 2017, nearly a year before an FBI raid on Cohen's home and office that was publicly known, according to partially unsealed documents released Tuesday.

Mueller on July 18, 2017, was granted a warrant authorizing federal investigators to search one of Cohen's Gmail accounts, filings reveal. The special counsel had sought access to all of Cohen's emails dating from January 2016 to July 2017.

The special counsel was granted a second warrant for "content stored in the iCloud account" associated with Cohen's Apple ID in August 2017.

And the filings show that Mueller obtained a third search warrant in November 2017 authorizing access for emails "sent or received" by an account belonging to Cohen stretching back to June 1, 2015. Trump declared his candidacy for the White House on June 16, 2015.

Mueller ultimately referred his investigation to the U.S. Attorney's Office in the Southern District of New York in Manhattan months after it obtained the warrants, according to the documents. Mueller is tasked by the Justice Department with investigating Russian inteference in the 2016 presidential election and possible collusion by the Trump campaign.

The FBI raided Cohen's home and office in April 2018 as part of the probe by federal prosecutors in Manhattan that led months later to the now-disbarred lawyer pleading guilty to multiple crimes. Trump at the time called the raid a "disgraceful situation."

The filings partially unsealed and released Tuesday shows that Mueller was eyeing Cohen for a crime that has not been previously disclosed: Acting as an unregistered foreign agent. Cohen was never charged with such a crime.

Mueller was also investigating Cohen for false bank entries, false statement to a financial institution, bank fraud, wire fraud and money laundering, the documents show. Those other areas were known to be subject matters of interest to the special counsel.

On Monday night, Lanny Davis, an attorney for Cohen, said that the court-ordered "release of the affidavits that led to the search warrants of Mr. Cohen's home, office, hotel and safety deposit box, only furthers his interest in continuing to cooperate and providing information and the truth about Donald Trump and the Trump organization to law enforcement and Congress."

The warrants describe investigators' use of a so-called triggerfish device to locate Cohen's cell phone in a New York hotel room.

Investigators also were granted a "pen register" which allowed them to monitor who was calling Cohen, and whom he was phoning. There was no tap on his phones, however, which would have allowed investigators to listen and record those calls.

Cohen pleaded guilty in 2018 to five counts of tax fraud, one count of making false statements to a financial institution, one count of making unlawful campaign contributions, a single count of excessive campaign contributions, and making false statements to Congress. He is set to begin a three-year sentence in May.

The campaign crimes relate to Cohen facilitating hush money payments to two women, porn star Stormy Daniels and Playboy model Karen McDougal, in exchange for their silence about their alleged affairs with Trump.

Cohen has said Trump personally directed him to pay Daniels on the eve of the 2016 presidential election to prevent her account from damaging his chances of winning the White House. The publisher of the supermarket tabloid The National Enquirer, who is a friend of Trump's, paid off McDougal.

Trump has denied having sex with either woman and has accused Cohen of lying about Trump's role in the payments. The White House did not immediately respond to a request for comment.

The filings unsealed Tuesday show that federal investigators in New York first became aware of Cohen's violation of campaign laws during the probe of his bank-related crimes. Exactly how that probe developed into the campaign-finance probe is blacked out in the filing, because it relates to an ongoing investigation.