NEW YORK — The FBI was investigating President Donald Trump’s former personal attorney and fixer for nearly a year before agents raided his home and office, documents released Tuesday show.

The search warrant, while heavily redacted, offered new details about the federal inquiry of Cohen’s business dealings and the FBI raids of his Manhattan home and office.

It shows the federal inquiry into Michael Cohen had been going on since July 2017 — far longer than had previously been known.

Lanny Davis, an attorney for Cohen, said the release of the search warrant “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 FBI raided Cohen’s Manhattan home and office last April, marking the first public sign of a criminal investigation that has threatened Trump’s presidency and netted Cohen a three-year prison sentence for tax evasion and campaign-finance violations. The feds, who also scoured Cohen’s hotel room and safe deposit box, seized more than 4 million electronic and paper files in the searches, more than a dozen mobile devices and iPads, 20 external hard drives, flash drives and laptops.

Both Cohen and Trump cried foul over the raids, with Cohen’s attorney at the time calling them “completely inappropriate and unnecessary” and the president taking to Twitter to declare that “Attorney-client privilege is dead!”

A court-ordered review ultimately found only a fraction of the seized material to be privileged.

The raids on Cohen were triggered in part by a referral from special counsel Robert Mueller, who separately is looking into Russian interference in the 2016 U.S. presidential election.

Tuesday’s release of the search warrant came nearly six weeks after U.S. District Judge William H. Pauley III partially granted a request by several media organizations, including The Associated Press, that the search warrant be made public due to the high public interest in the case.

The judge acknowledged prosecutors’ concerns that a wholesale release of the document “would jeopardize an ongoing investigation and prejudice the privacy rights of uncharged third parties,” a ruling that revealed prosecutors are still investigating Cohen’s illegal payments to two women to stay silent about alleged affairs with Trump.

The judge ordered prosecutors to redact Cohen’s personal information and details in the warrant that refer to ongoing investigations and several third-parties who have cooperated with the inquiry. But he authorized the release of details in the warrant that relate to Cohen’s tax evasion and false statements to financial institutions charges, along with Cohen’s conduct that did not result in criminal charges.

“At this stage, wholesale disclosure of the materials would reveal the scope and direction of the Government’s ongoing investigation,” Pauley wrote in a ruling last month.

Cohen pleaded guilty over the summer to failing to report more than $4 million in income to the IRS, making false statements to financial institutions and campaign-finance violations stemming from the hush-money payments he arranged for porn actress Stormy Daniels and former Playboy model Karen McDougal. Cohen implicated Trump in his guilty plea, saying the president directed him to make the payments during his 2016 campaign.

WATCH: What new information came out of Cohen hearing?