FBI Director James Comey told a Senate committee Wednesday he stands behind his letter that shook up the final days of last year's presidential election — and he would do it again.

Still, he said his decision to tell Congress that the FBI had found new emails that could be relevant to Hillary Clinton's private email server was not an easy one.

"This was terrible. It makes me mildly nauseous to think we might have had some impact on the election," Comey told the Senate Judiciary Committee. "I would make the same decision."

At the panel's routine hearing on oversight, the FBI director was grilled about the investigations into alleged Russian meddling in the election and into Clinton's use of a private email server at the State Department. Some Republicans defended Comey's actions and pressed him to reveal what evidence underpins accusations of Trump campaign contacts with Russia.

Two investigations, only one revealed

While the campaign was still ongoing, Comey did not reveal the existence of the Russia probe, but he did tell Congress that the FBI discovered thousands of messages from the Clinton email domain on the computer of disgraced politician Anthony Weiner, who was married to Clinton aide Huma Abedin. Democrats repeatedly questioned the FBI director about his decision-making process when he sent the letter on Oct. 28, just days before the election.

Animated as he defended his actions, Comey said he has tried over the course of his career to avoid taking any action ahead of an election that could potentially affect the vote. When considering whether to reveal the discovery of the emails, Comey said he considered the "catastrophic" implications of concealing the findings and the "very bad" effects of them potentially becoming public.

Comey said he notified lawmakers about the Clinton-related findings because he had "testified under oath repeatedly" that the investigation was over. Comey said he thought he treated the investigations the same because he did not reveal either probe at their outset.

"If I were not to speak about that, it would be a disastrous, catastrophic concealment," Comey said, repeatedly hitting his hand on the table in front of him.

Comey told lawmakers that those emails marked a major development at the time because investigators thought they may include missing messages.

"If you were standing there, staring at that on October 28, would you really conceal that?" he asked.

Trump has repeatedly denied any collusion with Russia, and Moscow has denied the U.S. intelligence community's conclusions that it meddled in the election.

Republican Sen. John Cornyn of Texas backed Comey's actions, calling it "sad" for people to "condemn" him for telling lawmakers about the emails.

"You were placed in an incredibly difficult position," Cornyn said. "You did the best you could."

Some Democrats echoed Clinton in alleging that Comey's decision affected the election's outcome. Committee ranking member Sen. Dianne Feinstein of California, who pressed Comey about why the letter to Congress was necessary, said the FBI was "noticeably silent" on the Russia probe but made an "explosive announcement" about Clinton just days before an election.

Comey added that he does not expect the FBI will say "another peep" about the investigation into Russian meddling until it is finished.