WASHINGTON – Federal authorities began investigating President Donald Trump's former personal lawyer, Michael Cohen, in mid-2017 and suggested their inquiry into crimes he said were ordered by the president remains incomplete, according to court documents unsealed Tuesday.

In hundreds of pages of search warrant applications, the Justice Department said it began examining Cohen's emails in July 2017 as part of special counsel Robert Mueller's investigation of Russian interference in the 2016 election. That means federal agents were scrutinizing one of Trump's closest associates far earlier than they had disclosed.

In 2018, agents obtained a raft of court orders authorizing them to search Cohen's hotel room, office and electronics for evidence of tax and bank fraud, as well as information about what prosecutors said were illegal payments during Trump's campaign to silence two women who claimed to have had sex with him. Prosecutors said they were investigating a possible conspiracy but didn't elaborate.

The warrant materials released Tuesday offer the clearest window yet into the early stages of a wide-ranging investigation of one of Trump's closest aides, his personal attorney and problem solver. In one justification for the searches, authorities said they were searching for evidence of false bank statements, wire fraud, bank fraud and illegal campaign contributions and “conspiracy as it pertains to the other subject offenses.”

Equally revealing were the details prosecutors and a court agreed could remain secret: In one document, laying out details of what prosecutors called "the illegal campaign contribution scheme," authorities blacked out 18 pages of detail, an indicator that the investigation remains incomplete.

Prosecutors had said they opposed making all of the warrant materials public because doing so “would jeopardize an ongoing investigation and prejudice the privacy rights of uncharged third parties.”

Cohen, a longtime Trump loyalist who once declared he would "take a bullet" for the president, said Trump directed him to set up the hush-money payments, and in testimony before Congress, he accused the president of participating in a criminal conspiracy.

Cohen told lawmakers he has been in "constant contact" with federal prosecutors in New York about unspecified cases. He has cooperated with the authorities in the Russia investigation and in the separate inquiry into the payments to pornographic actress Stormy Daniels and former Playboy Playmate Karen McDougal.

Trump and congressional Republicans questioned Cohen's credibility. Trump has dismissed the Mueller investigation as a "witch hunt" and called the congressional investigations "presidential harassment."

In outlining their requests for information, prosecutors noted the need to keep the inquiry secret, asserting that “premature public disclosure of this affidavit or the requested warrants could alert (Cohen) … causing him to destroy evidence, flee from prosecution or otherwise seriously jeopardize the investigation.” Prosecutors urged a federal judge to direct targets of the warrants – information service providers and others – not to disclose the existence of the warrants for at least 180 days.

Cohen's testimony:'I am not protecting Mr. Trump anymore.' Michael Cohen ties the president to criminal inquiries

More investigations:Michael Cohen's testimony prompts a new question: In web of Trump investigations, is anyone safe?

Sentenced:Michael Cohen, Trump's former lawyer, is sentenced to three years in prison for 'dirty deeds'

The FBI obtained a search warrant for Cohen's Gmail account July 18, 2017, and weeks later obtained another for his Apple iCloud account. The searches, conducted as part of the Russia investigation, sought documents dating to 2015.

Mueller's office turned part of its investigation of Cohen over to federal prosecutors in early 2018. Months later, the FBI raided his hotel room and office, seizing troves of documents.

As that inquiry went forward, Mueller examined Cohen over statements he made to Congress about a lucrative real estate development in Moscow that would have required the approval of the Russian government. Cohen acknowledged that he lied to lawmakers to hide the fact that Trump's business pursued the deal until he had effectively secured the Republican nomination.

In the months before the raid in April 2018, Mueller’s investigators obtained court orders authorizing them to record communication flowing through the Trump attorney’s email accounts, as part of its wide-ranging inquiry.

Monday, U.S. District Judge William Pauley ordered redacted versions of the documents to be released after nine news organizations, including ABC and CBS News, The Associated Press, CNN and The Wall Street Journal, sought to unseal them, citing public interest and a right to access.

Cohen’s lawyer Lanny Davis said in a statement Monday that the release of the documents furthers Cohen’s interest in “continuing to cooperate and providing information and the truth about Donald Trump and the Trump organization to law enforcement and Congress.”

Cohen pleaded guilty last year to federal bank and tax fraud charges and to two campaign finance violations for orchestrating the payments to two women. He separately pleaded guilty to lying to Congress about Trump's business dealings in Russia.

Cohen is scheduled to begin a three-year prison term May 6.

From January to August 2017, Cohen received more than $580,000 from Columbus Nova, an investment management firm controlled by Renova Group, a Switzerland holding company controlled by Russian oligarch Viktor Vekselberg, the government said in a court filing.

Columbus Nova said the company is not and has never been owned by foreign entities, including Vekselberg or Renova Group. The company said Columbus Nova hired Cohen as a business consultant after Trump's inauguration, and it has managed assets on behalf of Renova Group companies and other clients.

Vekselberg, who is close to Russian President Vladimir Putin, is one of several oligarchs the Trump administration sanctioned in 2018.

Throughout 2017, Cohen received millions of dollars from several more foreign entities, including a South Korea company that makes and sells aircraft to the Department of Defense, documents say.

The searches were conducted at his residence, an apartment at 502 Park Ave.; his office at 30 Rockefeller Plaza; his safe-deposit box at a bank in his apartment building; and Room 1628 of the Loews Regency Hotel.

More about Michael Cohen's testimony about President Trump, and his case:

Michael Cohen, President Trump's former lawyer, ends 3 days of 'excruciating' testimony with another scheduled

Michael Cohen, President Donald Trump's former lawyer, gets 2-month delay to start prison term