Under fire from Democrats, FBI Director James Comey said Wednesday it would have been "catastrophic" to keep Congress in the dark about developments in the Hillary Clinton email investigation that emerged close to Election Day.

Comey, in the most impassioned and public defense of how he handled the case, also said it made him feel "mildly nauseous" to think his actions in October might have influenced the race won by Republican Donald Trump over Democrat Clinton.

Andrew Rosenthal, the opinion editor at The New York Times, penned a column criticizing the FBI director.

"Mildly? He should be sick at heart, because there is no doubt that he affected the election, and it seems pretty obvious that he knew that he would do just that," he wrote.

But he told the Senate Judiciary Committee that the FBI cannot take into account how its actions might benefit or harm politicians.

"I can't consider for a second whose political futures will be affected and in what way," Comey said. "We have to ask ourselves what is the right thing to do and then do it."

The persistent questions from senators, and Comey's testimony, made clear that the FBI director's decisions of last summer and fall continue to roil national politics.

On Tuesday, Clinton said Comey's disclosure to Congress was partly to blame for her loss, but Trump tweeted that Comey "was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!"

Speaking at times with a raised voice, Comey said he faced two difficult decisions when agents told him they had found emails potentially connected to the Clinton case on a laptop belonging to former Rep. Anthony Weiner, D-N.Y., who was married to close Clinton aide Huma Abedin.

The FBI obtained a warrant to search the laptop and sifted through thousands of emails, Comey said, including ones that had been forwarded to Weiner's laptop and that contained classified information. But there was nothing found that changed the FBI's decision not to recommend charges.

Comey said he knew it was unorthodox to alert Congress to that discovery 11 days before Americans picked a new president. But he said he decided it would have been "catastrophic" to keep silent, especially when he had testified under oath that the investigation had been concluded.

"I sat there that morning and could not see a door labeled, 'No action here,'" Comey said.

Later in the hearing, under questioning from Democratic Sen. Patrick Leahy of Vermont, Comey maintained that he did not treat disclosures about investigations into Clinton's emails differently than potential connections between the Trump campaign and Russia.

The FBI began a counterintelligence investigation last July into whether Russia had coordinated with Trump campaign associates to influence the American election, but he did not disclose that until a hearing in March, after Trump had been elected and taken office.

That prompted Democrats to complain of a double-standard in the way the investigations were treated.

But Comey said that other than confirming the Clinton investigation existed, he did not discuss it until after it concluded last year. And he said the FBI does not expect to have anything to say about the Russia investigation until that one was over.

The Associated Press contributed to this report