FBI Director James Comey on Wednesday said former Attorney General Loretta Lynch’s tarmac meeting with President Bill Clinton in late June was the turning point in the investigation into Hillary Clinton’s use of a private email server.

Comey said the meeting aboard an airplane in Phoenix set off a series of events that ended with a bombshell revelation in the FBI director’s letter to congressional leaders 11 days before the November 8 election that the bureau would reopen the investigation.

During testimony on Capitol Hill before the Senate Judiciary Committee, Comey said “a number of things” had caused him to worry that Department of Justice leadership “could not credibly complete the investigation and decline prosecution without grievous damage to the American people’s confidence in the justice system.”

The “capper,” he said, was the meeting.

“I’m not picking on the attorney general, Loretta Lynch, who I like very much, but her meeting with President Clinton on that airplane was the capper for me,” he said. “And I then said, ‘You know what? The department cannot, by itself, credibly end this.'”

The meeting happened days before Comey held a press conference to announce the conclusion of the investigation, at which he said the bureau would not recommend criminal charges but that the former secretary of state had acted recklessly by using the private server.

Comey said he called Lynch the morning of the press conference to alert her to his decision to hold it. But Comey said he would not tell her what he was planning to say.

"I said to her, 'I hope someday you'll understand why I think I have to do this,'" Comey said. "But look, I was not loving this. I knew this would be disastrous for me personally. But I thought this is the best way to protect these institutions we care so much about."

He mentioned the press conference and his subsequent testimony under oath that the investigation was complete as reasons he had to go public when he knew that emails possibly relevant to the investigation were found on former New York Rep. Anthony Weiner's computer.

"When the Anthony Weiner thing landed on me on October 27 and there was a huge - this is what people forget - new step to be taken, we may be finding the golden missing emails that would change this case, if I were not to speak about that, it would be a disastrous, catastrophic concealment," he said. "It was an incredibly painful choice, but actually not all that hard, between very bad and catastrophic.

"I had to tell Congress that we were taking these additional steps," he continued. "I prayed to find a third door. I couldn't find it. Two actions: speak or conceal. I don't think many reasonable people would do it differently than I did, no matter what they say today. If you were standing there staring at that on October 28, would you really conceal that? So I spoke."

Bill Clinton and Lynch said they discussed their grandchildren during the tarmac meeting, which lasted about 30 minutes.

In December, Lynch told CNN's Jake Tapper she regretted the meeting.

"I wish I had seen around that corner and not had that discussion with the former president, as innocuous as it was, because it did give people concern," Lynch said. "It did make people wonder is it going to affect the investigation that's going on, and that's not something that was an unreasonable question for anyone to ask."

Hillary Clinton, the 2016 Democratic presidential nominee, said on Tuesday that the letter from Comey to congressional leaders played a large role in her defeat by President Donald Trump.