In his new book, former FBI director James Comey blames President Barack Obama and Attorney General Loretta Lynch for “setting up” his bureau amid the investigation into the Hillary Clinton email affair.

In the book, Comey writes that President Obama “jeopardized the Department of Justice’s credibility,” by referring to Clinton’s use of a private email server as a “mistake,” according to an advance copy obtained by the Washington Examiner.

Obama appeared on Fox News in 2016, and said that Clinton may have been careless but did not do anything to intentionally harm national security. “President Obama is a very smart man who understands the law very well,” wrote Comey. “To this day, I don’t know why he spoke about the case publicly and seemed to absolve her before a final determination was made.”

Comey also points the finger at Attorney General Loretta Lynch, who he says approached him and asked him to refer to the ongoing investigation as a “matter,” instead of an “investigation.”

The former FBI director saw this request as overtly political. The Clinton campaign had been referring to the criminal investigation as a “matter” to divert attention away from the fact that a presidential candidate was actually being investigated by the FBI.

READ MORE: 5 key takeaways from Comey's interview ahead of tell-all book release

“The attorney general seemed to be directing me to align with the Clinton campaign strategy,” Comey wrote. “Her ‘just do it’ response to my question indicated that she had no legal or procedural justification for her request.”

Just weeks before meeting Comey, Lynch met former president Bill Clinton at an airport in Arizona. After articles circulated alleging that the former president met with Lynch to try and sway the investigation, the FBI scrambled to find and silence the source, according to conservative watchdog, Judicial Watch.

In a statement released on Sunday, Lynch denied any attempt to meddle in the investigation. “At no time did I ever discuss any aspect of the investigation with anyone from the Clinton campaign or the DNC,” it read.

“I have known James Comey almost 30 years. Throughout his time as Director we spoke regularly about some of the most sensitive issues in law enforcement and national security. If he had any concerns regarding the email investigation, classified or not, he had ample opportunities to raise them with me both privately and in meetings. He never did."

Statement from former AG Loretta Lynch on Comey pic.twitter.com/w9lRIT0dwS — Laura Jarrett (@LauraAJarrett) 15 апреля 2018 г.

Comey has been accused of partisanship in the Clinton email investigation, most notably by President Donald Trump, who fired Comey for his handling of the case last May. In a tweet on Saturday, the president slammed Comey for his admission that he treated Clinton differently because he thought she would win the 2016 election.

Unbelievably, James Comey states that Polls, where Crooked Hillary was leading, were a factor in the handling (stupidly) of the Clinton Email probe. In other words, he was making decisions based on the fact that he thought she was going to win, and he wanted a job. Slimeball! — Donald J. Trump (@realDonaldTrump) 15 апреля 2018 г.

In his book, Comey writes that he announced the re-opening of the FBI’s investigation days before the election, because he feared keeping quiet would make Clinton look like an “illegitimate president.”

In his interview on Sunday, Comey told ABC’s George Stephanopoulos that he “was operating in a world where Hillary Clinton was going to beat Donald Trump.”

Last year, Senator Chuck Grassley (R-IA) published evidence that Comey had already drafted an exoneration letter for Clinton, while the FBI had yet to interview 17 key witnesses. “Conclusion first, fact-gathering second,” wrote Grassley. “That’s no way to run an investigation.”

Comey drafted the Crooked Hillary exoneration long before he talked to her (lied in Congress to Senator G), then based his decisions on her poll numbers. Disgruntled, he, McCabe, and the others, committed many crimes! — Donald J. Trump (@realDonaldTrump) 16 апреля 2018 г.

Comey’s book, ‘A Higher Loyalty,’ is already number one on the Amazon bestsellers list ahead of its release on Tuesday. While the disgruntled FBI director may go down as a bestselling author, President Trump believes, according to his Sunday tweet, that “Slippery James Comey, a man who always ends up badly and out of whack (he is not smart!), will go down as the WORST FBI Director in history, by far!”