Donald Trump has disputed findings by the Justice Department that former FBI director James Comey’s handling of the Hillary Clinton email probe was not politically motivated.

The US president declared that the FBI was biased “at the top level” and “plotting against my election”.

The department’s inspector general (IG) report, while critical of the FBI and Mr Comey personally, did not find evidence that political bias tainted the investigation of Mrs Clinton’s email practices in the months and days leading up to Mr Trump’s election.

But after tweeting that he did a “great service” to the nation by firing Mr Comey, Mr Trump marched out to the White House North Lawn to talk with Fox & Friends, claiming the report “totally” exonerated him, then pointing to accomplishments he said he has achieved and complaining about not getting proper credit.

Then he turned to other reporters and went over the same list.

On the inspector general report that found no political bias in the FBI’s final conclusions, he said: “The end result was wrong. There was total bias.”

“Comey was the ring leader of this whole, you know, den of thieves. It was a den of thieves,” he said.

Mr Trump’s comments followed the IG’s 500-page report that said Mr Comey was “insubordinate” in his handling of the Clinton investigation because he broke agency protocol.

The report also rebuked FBI officials for exchanging anti-Trump text messages during the 2016 campaign.

But it said: “We found no evidence that the conclusions by the prosecutors were affected by bias or other improper considerations; rather, we determined that they were based on the prosecutors’ assessment of the facts, the law and past department practice.”

Mr Trump’s supporters have argued that the findings are proof of political bias at the FBI’s highest levels that then tainted the Russia investigation, first led by the FBI and now by special counsel Robert Mueller.

Mr Mueller’s probe includes a look into whether Mr Trump himself tried to obstruct justice by firing Mr Comey.

Mr Trump said that the Mueller probe “has been totally discredited”.

“The IG Report is a total disaster for Comey, his minions and sadly, the FBI,” Mr Trump tweeted.

“Comey will now officially go down as the worst leader, by far, in the history of the FBI. I did a great service to the people in firing him. Good Instincts.”

Mr Trump’s personal lawyer, Rudy Giuliani, told Fox & Friends that the report casts doubt on whether Mr Trump will ever agree to an interview with Mr Mueller’s team because “why would he get interviewed by a corrupt investigation?”

Mr Trump himself said he had “reservations”.

The report documents in painstaking detail one of the most consequential investigations in modern FBI history and reveals how the bureau, which for decades has endeavoured to stand apart from politics, came to be entangled in the 2016 presidential election.

It underscores efforts by FBI and Justice Department leaders to juggle developments in the Clinton investigation – she had used private email for government business while secretary of state – with a separate probe that was then unknown to the American public into potential co-ordination between the Trump campaign and Russia.

Clinton supporters believe Mr Comey’s actions, far from hurting Mr Trump, may well have torpedoed her chance of becoming president.

The IG found the FBI director erred when he announced in July 2016 that Mrs Clinton had been “extremely careless” with classified material but would not be charged with any crime, and again months later when Mr Comey told Congress just days before the election that the investigation into Mrs Clinton’s emails had been reopened.

Mr Comey concealed from the Justice Department his plans to make a public announcement until the morning he did so, even though such statements are normally handled by the Justice Department, if at all, the report says.

“We found that it was extraordinary and insubordinate for Comey to do so, and we found none of his reasons to be a persuasive basis for deviating from well-established Department policies in a way intentionally designed to avoid supervision by department leadership over his actions,” the report says.

Trump supporters, and then the president himself, quickly focused on the report’s recounting of anti-Trump text messages from two FBI officials who worked on the Clinton probe and later the Russia case, including one in which an agent says “We’ll stop it”, with regard to a possible Trump victory.

The report suggests that text from Peter Strzok, who was later dropped from Mr Mueller’s team, “implies a willingness to take official action to impact the presidential candidate’s electoral prospects”.

It did not find evidence that those views seeped into the investigation.

FBI director Chris Wray told reporters the FBI accepted the report’s findings and was making changes, including requiring further training for FBI employees and re-emphasising the importance of objectivity.

In a New York Times opinion piece released after the report, Mr Comey said he disagreed with some conclusions but respected the watchdog’s work.

The report also notes that Mr Comey, despite chiding Mrs Clinton for mishandling government business, occasionally used personal email himself to discuss FBI matters.

“But my emails,” she said, reacting in a three-word tweet.