Former FBI Director James Comey broke FBI and Justice Department protocol in his handling of the 2016 investigation of Hillary Clinton's email scandal, but Comey was not motivated by any political bias when he cleared Clinton of any criminal wrongdoing, according to a long-awaited report released Thursday by a watchdog official for the Justice Department.

"While we did not find that these decisions were the result of political bias on Comey’s part, we nevertheless concluded that by departing so clearly and dramatically from FBI and department norms, the decisions negatively impacted the perception of the FBI and the department as fair administrators of justice," Inspector General Michael Horowitiz concluded in the report. The 500-page document focused on the FBI's handling of the investigation of Clinton's use of a private email server while she was secretary of state.

While Horowitz didn't find political bias by Comey, he did uncover more anti-Trump emails from a pair of FBI officials who were involved in an extra-marital affair.

The report says Lisa Page wrote to Peter Strzok in a text message: (Trump's) not ever going to become president, right?" In response, Strzok, who helped oversee the Clinton email investigation, wrote "No. No he's not. We'll stop it."

Horowitz acknowledged in December that his inquiry into the Clinton case had unearthed anti-Trump text messages between the two. Horowitz notified Special Counsel Robert Mueller about the texts because Strzok had become part of Mueller's team on the separate Russia investigation. Mueller promptly removed Strzok from his staff. Page left Mueller's staff before the texts became public.

The report characterized the politically-charged text messages as “antithetical to the core values of the FBI,” but investigators "did not find documentary or testimonial evidence that improper considerations, including political bias , directly affected the specific investigative actions we reviewed."

"The conduct by these employees cast a cloud over the entire FBI investigation and sowed doubt about the FBI’s work," the report concluded. "The damage caused by these employees’ actions extends far beyond the scope of the (Clinton) investigation and goes to the heart of the FBI’s reputation for neutral fact finding and political independence."

Congress and the White House have anxiously awaited Horowitz's report, which has taken about 18 months to complete and could affect Mueller’s investigation into Russia's interference in the 2016 election.

President Trump is likely to seize on the report to argue he was right to fire the former FBI director, who had been leading an investigation into Russian meddling in the 2016 election.

Rep. Trey Gowdy, R-S.C., chairman of the House Oversight and Government Reform Committee, said he was "alarmed, angered, and deeply disappointed by the Inspector General's finding of numerous failures by DOJ and FBI" in the Clinton probe.

But Democrats say the report shows that Comey's actions helped elect Trump, undercutting the president's accusations that FBI and Justice Department officials were biased against him.

Clinton has blamed her election defeat on Comey's public disclosure of a reopening of the email investigation 11 days before the 2016 election. Congressional Democrats also say it was unfair for Comey to publicly discuss the Clinton investigation while keeping mum about the FBI's investigation of the Trump campaign's possible ties to Russia.

What does the report say about Comey?
The report blasts Comey for deviating from Justice Department guidelines when he held a July 5, 2016, news conference to announce that there would be no criminal charges brought against Clinton and also to accuse her of carelessness in her use of the private email server. Typically, the FBI’s role would be limited to referring its findings to the attorney general. It would then be up to prosecutors to decide whether to bring criminal charges. The Justice Department — not the FBI — would typically make any public announcements about the case.

"Although we did not find clear evidence that Secretary Clinton or her colleagues intended to violate laws governing the handling of classified information, there is evidence that they were extremely careless in their handling of very sensitive, highly classified information," Comey said at the news conference.

Comey himself acknowledged that he was breaking with protocol, telling reporters at the time that his decision to make a statement was “unusual.” He also said he not briefed his bosses beforehand on the findings.

Separately, Thursday's report rebukes Comey for sending a letter to Congress in late October 2016 telling lawmakers the FBI had re-opened its investigation of Clinton. The FBI had found evidence of previously undiscovered emails on the computer of former New York Rep. Anthony Weiner, who was then married to a top Clinton aide.

The FBI found no evidence to charge Clinton, and Comey announced — just two days before the election — that the case was closed.

Comey is not the only high-profile Obama administration official whose actions are expected to draw criticism Thursday. Comey has said he was prompted to take extraordinary action in the Clinton case, in part, because he believed then-Attorney General Loretta Lynch showed poor judgment when she met privately in June 2016 with former President Bill Clinton when their planes were parked on the tarmac in Phoenix.

Lynch rebuffed calls for her recusal from the investigation, choosing instead to assert that she would accept the recommendation of career prosecutors.

How could this affect the Russia probe?
Comey is a witness in the Russia investigation being led by Mueller. The special counsel is looking into whether Trump's firing of Comey in May 2017 was an effort by the president to obstruct justice by derailing the FBI's probe of possible collusion between the Trump campaign and the Kremlin.

The inspector general's report could have seriously undercut Comey’s credibility as a witness in the Mueller investigation if it had found that he lied about his actions in the Clinton case or that his actions were politically motivated. It's less damaging to Comey that the report found that his main offense was violating the procedural norms of the FBI and DOJ.

Still, as Horowitz concluded, Comey's actions "negatively impacted the perception of the FBI and the department as fair administrators of justice."

How will President Trump react?
The president is likely to applaud the report as evidence that he was right to fire Comey. The Republican National Committee previewed its response Wednesday, issuing a press release with these headlines: "Lyin' Comey Is About To Sink Even Lower. Ahead Of The Release Of The DOJ’s Inspector General Report, A Look At James Comey’s Long Pattern Of Misconduct And Bad Behavior."

Trump is likely to ramp up his attacks on FBI and Justice Department, which he has denounced as "corrupt."

The completed review by the inspector general will likely prompt a wave of fresh criticism of the FBI — which Trump has singled out in scathing rebukes as Mueller's inquiry has produced indictments against former members of the president's administration and campaign, including national security adviser Michael Flynn and former campaign chairman Paul Manafort.

The inspector general's report also comes just two months after the office issued a related review, concluding that former FBI deputy director Andrew McCabe misled investigators about his role in providing information to the media about a separate FBI investigation of the Clinton Foundation before the 2016 election.

In McCabe's case, the inspector general determined that the former FBI official "lacked candor" when he was questioned multiple times under oath about sharing information about an inquiry into the Clinton Foundation with a Wall Street Journal reporter in October 2016.

The matter has been referred to federal prosecutors to determine whether McCabe should face criminal charges. McCabe's attorney, Michael Bromwich, has called the referral "unjustified."

How is Congress reacting?
Even before the report was released Thursday, Republican Reps. Andy Biggs of Arizona and Ron DeSantis and Matt Gaetz of Florida sent a letter to Horowitz expressing concern that it may have been watered-down from the original version during an internal review process. They asked Horowitz to provide them with his original drafts.

"I hope the substance of this report was maintained throughout the entire review process," Biggs said. "However, I have no faith that those under investigation are also able to provide an unbiased review and edit the IG’s work. We need complete transparency, and I urge the Inspector General to show Congress all versions of his report leading up to the final product."

Some GOP conservatives were continuing to call Thursday for a second special counsel to look into the handling of the Clinton email case by the FBI and the DOJ.

Democrats said the report shows "that the FBI’s actions helped Donald Trump become President."

"As we warned before the election, Director Comey had a double-standard: he spoke publicly about the Clinton investigation while keeping secret from the American people the investigation of Donald Trump and Russia," said top Judiciary Committee Democrat Jerrold Nadler of New York and top Oversight Committee Democrat Elijah Cummings of Maryland in a joint statement.

"The FBI should not have spoken publicly about the case after recommending against criminal charges," the two Democratic leaders said. "They should not have revealed that they had reopened the case just days before the election. These actions violate longstanding guidelines designed to protect citizens from unfair attacks and avoid influencing elections."