James Comey was so sure that Hillary Clinton would win the 2016 presidential election that he publicly announced re-opening her email investigation because he feared not doing so could make her appear “illegitimate.”

Comey revealed the thoughts behind his explosive decision to go public with information that the FBI had discovered emails from Clinton on Anthony Weiner’s laptop.

“I believed it was my duty to inform Congress that we were restarting the investigation,” Comey writes about the October 2016 statement. “I would say as little as possible, but the FBI had to speak.”

On Oct. 28, 2016, Comey sent a letter to Congress informing them about the investigation. A decision Clinton believes cost her the presidency.

In retrospect, however, Comey said he might have handled it differently if he knew Clinton could lose.

“It is entirely possible that, because I was making decisions in an environment where Hillary Clinton was sure to be the next president, my concern about making her an illegitimate president by concealing the restarted investigation bore greater weight than it would have if the election appeared closer or if Donald Trump were ahead in all polls,” Comey writes in his new memoir.

“But I don’t know.”