Former FBI Director James Comey wrote that President Barack Obama opted against giving many public warnings about Russian election interference because he figured Hillary Clinton would win the 2016 presidential race.

Comey wrote that Obama thought Russian President Vladimir Putin "backed the wrong horse" in Donald Trump.

Former FBI Director James Comey wrote in his highly anticipated tell-all book that former President Barack Obama didn't want to overdo his public warnings about Russian election interference because he figured Donald Trump "was going to lose anyway."

The book, "A Higher Loyalty," is set to be released on Tuesday. It's Comey's first extensive account of how he handled investigations into both President Trump and his opponent, 2016 Democratic presidential nominee Hillary Clinton.

ABC News, which obtained a copy of the book early, reported that Comey wrote that the mindset that Clinton would easily defeat Trump in spite of Russian interference played a role in Obama's handling of the information that Russia was seeking to influence the elections.

Comey wrote that, in September 2016, Obama opted for fewer public warnings about the interference because Russian President Vladimir Putin "backed the wrong horse" anyway.

"And why give Donald Trump the excuse to blame Obama for frightening the American people?" Comey wrote of Obama's mindset. "He was going to lose anyway."

Comey, who said he did not vote in the 2016 election, wrote of his affection for Obama, which contrasted with his disdain for Trump. Comey said his wife and daughters voted for Clinton.