Washington (CNN) Former FBI director James Comey says his belief that Hillary Clinton would win the 2016 presidential election played a role in the way he handled the investigation into her use of a private email sever as secretary of state.

The former FBI director, who was abruptly fired by Trump last year, announced in July 2016 that he would not recommend charges in the investigation of Clinton's email practices. But in a controversial move, Comey told Congress just days before the election that the FBI was reviewing additional emails in relation to the investigation. In early November, Comey then informed lawmakers that those emails did not warrant any further action.

"Wasn't the decision to reveal influenced by your assumption that Hillary Clinton was going to win, and your concern that, she wins, this comes out several weeks later and then that's taken by her opponents as a sign that she's an illegitimate president?," Stephanopoulos asks.

"It must have been," Comey responds, adding, "I don't remember consciously thinking about that, but it must have been. I was operating in a world where Hillary Clinton was going to beat Donald Trump. I'm sure that it was a factor. I don't remember spelling it out, but it had to have been. That she's going to be elected president, and if I hide this from the American people, she'll be illegitimate the moment she's elected, the moment this comes out."

Read More