WASHINGTON — The FBI mishandled parts of its application to monitor a Trump campaign aide as it was probing possible Russian interference in the 2016 election, but the overall investigation was justified, according to a long-awaited report by the Justice Department's watchdog that rebuts the president's depiction of a politically biased plot against him.

The 434-page report by Justice Department Inspector General Michael Horowitz concluded that the FBI and the Justice Department launched their investigation into the 2016 campaign not for political reasons, but because of evidence the Russian government was using cutouts to reach out to the Trump campaign as part of its efforts to influence the election.

The inspector general said he examined more than a million documents and interviewed more than 100 witnesses.

Horowitz found that political bias did not taint the actions of former FBI leaders who have frequently been the subject of presidential attacks on Twitter, including former Director James Comey, former Deputy Director Andrew McCabe and former Deputy Assistant Director Peter Strzok.

Carter Page, a foreign policy adviser to Donald Trump's 2016 presidential campaign, speaks with reporters following a day of questions from the House Intelligence Committee, on Capitol Hill in Washington, on Nov. 2, 2017. J. Scott Applewhite / AP file

"We did not find documentary or testimonial evidence that political bias or improper motivation influenced the decisions" to open investigations into four Trump campaign aides, the report says.

Click here to read the report.

At the same time, the report found enough errors — and in at least one case, alleged document tampering by a low-level FBI lawyer — to provide Trump and his allies grist to continue to claim that the investigation was tainted.

Attorney General William Barr wasted no time in doing so, issuing a statement that essentially disputed the IG's findings and asserting that the FBI did not have proper justification to open the investigation.

"The Inspector General's report now makes clear that the FBI launched an intrusive investigation of a U.S. presidential campaign on the thinnest of suspicions that, in my view, were insufficient to justify the steps taken," Barr said.

And in a stunning move, the federal prosecutor Barr appointed to conduct a separate but related investigation, U.S. Attorney for Connecticut John Durham, also said in a statement that he disagreed with the report. It is extremely unusual for a federal prosecutor to comment publicly, let alone express a conclusion, about a pending criminal investigation. Durham's move is likely to draw significant criticism.

"Our investigation is not limited to developing information from within component parts of the Justice Department," Durham's statement said. "Our investigation has included developing information from other persons and entities, both in the U.S. and outside of the U.S. Based on the evidence collected to date, and while our investigation is ongoing, last month we advised the Inspector General that we do not agree with some of the report's conclusions as to predication and how the FBI case was opened."

For his part, President " called the report’s findings “far worse than anything I would have even imagined."

"This was an overthrow of government," he said. "This was an attempted overthrow, and a lot of people were in on it, and they got caught. they got caught red-handed."

The Justice Department's watchdog's report includes no such finding. Nor does it agree with Barr's assessment that the probe was based on "the thinnest of suspicions." But it documents so many problems with the FBI's applications to a national security court to conduct secret surveillance on a Trump aide that he is launching a separate inquiry into how the FBI obtains national security warrants to eavesdrop on American citizens, the report says.

The report also recommends that new guidelines be established for investigations into presidential campaigns. The report says a confidential human source had a conversation with an unnamed senior Trump campaign aide who was not a subject of the investigation in September 2016, but nothing came of it.

Horowitz and his team spent nearly two years on an investigation that was intended to scrutinize the FBI's surveillance of Carter Page, a foreign policy adviser to the Trump campaign who had traveled to Russia and had previously been the target of recruitment by Russian intelligence officers.

The report said the surveillance of Page, which began in October 2016, did not spark the FBI's Russia investigation, which began in July 2016 after an Australian diplomat reported that a different Trump aide had learned from a Russian agent that the Russian government possessed thousands of Democratic emails.

The report found that some of the information the FBI put in its warrant application for Page was based on reporting by Christopher Steele, a former British spy who authored a controversial so-called dossier accusing Trump of conspiring with the Russians. Much of that information was never corroborated, the report says. Page was never charged.

"We found that the FBI did not have information corroborating the specific allegations against Carter Page in Steele's reporting when it relied upon his reports in the first (warrant) application or subsequent renewal applications," the report said.

The report says the inspector general learned that a group within the FBI tasked with evaluating human sources completed a review of Steele's past work for the bureau in early 2017. The review found that Steele's past criminal reporting had been "minimally corroborated," which contradicted the FBI's statement to the court that Steele's prior reporting had been ''corroborated and used in criminal proceedings." The context of this is unclear, because it's been widely reported that Steele helped the FBI in its investigation of corruption in international soccer.

"That so many basic and fundamental errors were made on four FISA applications by three separate, hand-picked teams, on one of the most sensitive FBI investigations that was briefed to the highest levels within the FBI and that FBI officials expected would eventually be subjected to close scrutiny, raised significant questions regarding the FBI chain of command's management and supervision of the FISA process," the report says, referring to the Foreign Intelligence Surveillance Act, the authority under which the FBI obtains national security surveillance powers.

Barr seized on the criticism.

Justice Department Inspector General Michael Horowitz testifies before the Senate Judiciary Committee in the Hart Senate Office Building on June 18, 2018. Chip Somodevilla / Getty Images file

"In the rush to obtain and maintain FISA surveillance of Trump campaign associates, FBI officials misled the FISA court, omitted critical exculpatory facts from their filings, and suppressed or ignored information negating the reliability of their principal source," the attorney general said in his statement. "The Inspector General found the explanations given for these actions unsatisfactory."

In a statement, FBI Director Christopher Wray said the FBI "accepts the report's findings and embraces the need for thoughtful, meaningful remedial action. I have ordered more than 40 corrective steps to address the report's recommendations."

Wray said the FBI will change how it applies for national security warrants and how it manages confidential human sources.

"We are vested with significant authorities, and it is our obligation as public servants to ensure that these authorities are exercised with objectivity and integrity," Wray said. "Anything less falls short of the FBI's duty to the American people."

Download the NBC News app for breaking news and politics

Still, the report found no evidence that political bias influenced the decision to pursue the warrant on Page. Officials felt that they had to get to the bottom of a potentially serious threat to national security, the report says.

James Comey, former FBI director, speaks to reporters after testifying before the House Judiciary and House Oversight and Government Reform Committees joint investigation in Washington on Dec. 7, 2018. Al Drago / Bloomberg via Getty Images file

"The IG report confirms FBI was justified in opening an investigation that uncovered criminal activity by the President's campaign manager, national security adviser and other aides," Sen. Mark Warner, the ranking Democrat on the Intelligence Committee, tweeted. "It was never a witch hunt. It was the men and women of federal law enforcement doing their jobs."

The report raised questions about the FBI's use of confidential human sources to gather information from individual members of the Trump campaign. FBI officials said it was a normal investigative technique, but the inspector general questioned whether there should be special guidelines when it comes to political campaigns.

The report did, however, refute the notion that the FBI placed a spy in the Trump campaign.

"We found no evidence," the report said, that the FBI sent any confidential sources to join the Trump campaign, or sent them to campaign offices or events, or tasked them to report on the Trump campaign.

The report also noted that of the four Trump aides who initially came under investigation, only Page was placed under national security surveillance. Foreign policy adviser George Papadopoulos, national security adviser Michael Flynn and campaign chairman Paul Manafort were not.

Page and Manafort, however, were already under investigation even before the FBI probe got underway. Page was the subject of an ongoing counterintelligence investigation opened by the FBI's New York Field Office in April 2016, relating to his contacts with suspected Russian intelligence officers, the report said. Manafort was under an ongoing criminal investigation, supervised by the Money Laundering and Asset Recovery Section in the Department's Criminal Division, concerning millions of dollars he received from the government of Ukraine.

Perhaps the most concrete example of apparent misconduct the inspector general uncovered concerns what he says was the altering of an email regarding Page's relationship as a source to an unnamed government agency.

In an email to NBC News, Page said he believes that is a reference to his relationship with the CIA, "the main agency I've frequently dealt with for many many years."

An FBI lawyer altered the email, the report says, in a way that hid the fact that Page had been a source. That information would have been relevant to the court, the report says, in the context of Page's dealings with Russians.

The IG's examination of the Page case was anticipated as an important marker in the long-standing political debate over whether the Russia investigation into the Trump campaign was on the level. Trump and his allies have convinced millions of Americans it was not, despite a report by former special counsel Robert Mueller that was something of a win for Trump, given that despite criticism of obstruction and contacts between the campaign and Russians, it could not establish a conspiracy and did not recommend charges.

The Horowitz report will not be the last word, however. Barr appointed Durham, to conduct a special investigation into the larger question of whether any of the U.S. government efforts to investigate Russian election interference involved improper surveillance of the Trump campaign.

That investigation has become a criminal probe, people familiar with the matter have said, though it is unclear what possible crimes are being examined. Barr and Durham have traveled to the United Kingdom and Italy in pursuit of information.