FBI Director James Comey gave an impassioned defense to lawmakers on Wednesday of his decision, just days before the 2016 presidential election, to inform Congress that the bureau was reopening its investigation into Hillary Clinton’s use of a private email server as secretary of state.

“I faced a choice,” Comey said in testimony before the Senate Judiciary Committee. “I’ve lived my entire career by the tradition that if you can possibly avoid it, you avoid any action in the run-up to an election that might have an impact, whether it’s a dog-catcher election or president of the United States. But I sat there that morning and I could not see a door labeled, ‘No action here.'”

Comey said that on Oct. 27, the investigative team informed him that the metadata analysis of emails on disgraced former Rep. Anthony Weiner’s laptop — seized by the FBI in an unrelated investigation — showed thousands of Clinton’s emails on that device, possibly including those from her first three months as secretary of state, which had been missing until then. Weiner was married to Clinton’s close aide, Huma Abedin.

Comey said he then authorized the team to seek a search warrant.

In deciding how to handle the potentially explosive information, “I could see two doors and they were both labeled ‘action,’” Comey told the committee. “One was labeled ‘speak,’ and the other was labeled ‘conceal.’”

To “not speak about it” to Congress — which had been assured months earlier that the investigation was closed — would have been “an act of concealment,” the FBI director concluded.

“So I stared at ‘speak’ and ‘conceal,'” Comey recalled. “Speak would’ve been really bad. There’s an election in 11 days. Lordy that would be really bad. Concealing, in my view, would’ve been catastrophic, not just to the FBI but well beyond. And honestly, if it’s between really bad and catastrophic, I said to my team, ‘We’ve got to walk into the world of really bad.'”

The FBI director sent his letter to Congress the next day, news of which leaked almost immediately.

Story continues

“One of my junior lawyers said, ‘Should you consider what you’re about to do could help elect Donald Trump president?’” Comey recalled. “And I said, ‘Thank you for raising that. Not for a moment. Because down that path lies the death of the FBI as an independent institution in America.’”

Comey’s comments came a day after Clinton first publicly blamed his letter, in part, for her election loss.

“If the election had been on Oct. 27, I would be your president,” Clinton said at the Women for Women International luncheon in New York City. “I was on the way to winning until a combination of Jim Comey’s letter on Oct. 28 and Russian WikiLeaks raised doubts in the minds of people who were inclined to vote for me but got scared off.”

Trump fired back via Twitter.

FBI Director Comey was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds! The phony… — Donald J. Trump (@realDonaldTrump) May 3, 2017





…Trump/Russia story was an excuse used by the Democrats as justification for losing the election. Perhaps Trump just ran a great campaign? — Donald J. Trump (@realDonaldTrump) May 3, 2017





Comey said he is troubled by the way events played out.

“It makes me mildly nauseous to think that we might have had some impact on the election,” he said.

But the FBI director also said it wouldn’t have changed his decision.

“Everybody who disagrees with me has to come back to Oct. 28 with me and stare at this and tell me what you would do,” Comey said. “Would you speak or would you conceal? And honestly, in hindsight — and this has been one of the world’s most painful experiences — I would’ve made the same decision.”

Read more from Yahoo News: