FBI Director James Comey struggled on Wednesday to justify the five immunity agreements given to witnesses in the investigation of Hillary Clinton's emails.

During a hearing before the House Judiciary Committee, Comey argued his agents needed to move quickly in June to obtain a laptop computer from Cheryl Mills, Clinton's former chief of staff, that contained classified material.

"The investigative team really wanted to get access to the laptops that were used to sort these emails," Comey said. Heather Samuelson, another former Clinton aide, was also given an "act of production" immunity deal in exchange for the laptop she used to cull emails.

But Republicans on the committee were unsatisfied with the FBI director's explanations. Frustration with the outcome of the case, which Comey closed in July without recommending indictments for anyone involved, bubbled over after months of simmering in GOP circles.

Rep. Trey Gowdy, R-S.C., demanded to know how the FBI could argue Clinton and her team were not treated preferentially "when you have five immunity agreements and no prosecution."

"That is not the FBI that I used to work with," said Gowdy, a former prosecutor.

Comey revealed during the hearing Wednesday that one witness — Paul Combetta, an employee at a firm called Platte River Networks that was hired in 2013 to manage Clinton's email network — demanded an immunity agreement because he had deleted emails after "interest" in the case spiked thanks to a March 2015 story about the server in the New York Times.

"That's why the guy wouldn't talk to us without immunity," Comey said, later noting that Combetta claimed he deleted emails on his own accord in March 2015.

Mills, too, had asked the Justice Department for protection through her attorney before agreeing to relinquish control of the laptop she used to sift through Clinton's records, Comey said.

The scope of immunity offered in the Clinton email case has troubled Republicans in recent weeks. The deal given to Bryan Pagliano, a former IT aide to Clinton, was reported publicly as the investigation unfolded.

But four others were kept under wraps until after the probe had ended, raising questions about why the FBI chose not to disclose the agreements when given the opportunity to do so in July testimony before the House Oversight Committee.

Comey said his agents had not interviewed everyone who sent classified information to Clinton's private server during her tenure. He noted "it wasn't a smart use of resources to track down" everyone who sent sensitive information to the former secretary of state.

One such individual was a private citizen in Japan whose message to Clinton was ultimately deemed classified. Others were lower-level State Department staffers, Comey said.

The FBI director acknowledged that Clinton would be in "big trouble" had she engaged in the same conduct while working at his bureau.

"You'd be disciplined in some serious way, you might be fired," he said. "I'm also certain you would not be prosecuted criminally on these facts."

The hearing Wednesday is unlikely to satisfy critics of the FBI investigation who feel the Justice Department was too generous with its immunity powers.