FBI Director James Comey testified Wednesday that former Hillary Clinton chief of staff Cheryl Mills and another top aide had “some” classified material on laptops they turned over to the bureau in its probe of Clinton's private server use as secretary of state -- yet the aides still received immunity.

Comey made the acknowledgment while testifying before the House Judiciary Committee, where Republicans had tough questions about a newly revealed set of immunity deals in the Clinton case.

At one point, a defensive Comey's umbrage at the grilling seemed to boil over.

“You can call us wrong," Comey said. "You can call me a fool. You cannot call us weasels.”

NEW TONIGHT: 2nd FBI-Clinton document dump on a Friday this month--Continues pattern of holiday/weekend releases:https://t.co/VHtYLHAh13 pic.twitter.com/tGmsCfE44a — Fox News Research (@FoxNewsResearch) September 24, 2016

The director claimed the findings did not constitute a crime but declined to directly answer a question on whether having classified material on a laptop or other private electronic device was against federal regulations.

“You’d have to know the circumstances,” Comey told committee Chairman Bob Goodlatte, R-Va.

Details about Mills and agency lawyer Heather Samuelson being granted immunity were first reported last week.

GOP lawmakers fumed at Wednesday's hearing that the bureau was too lax with those arrangements. Rep. Jim Sensenbrenner, R-Wis., lamented what he called the "DOJ immunity-producing machine," though Comey disagreed with that assessment.

Committee member Louie Gohmert, a Texas Republican and former judge, asked Comey on Wednesday how and why Mills and Samuelson were granted immunity when investigators suspected they, like Clinton, had mishandled classified electronic information.

“You granted immunity to people you needed to make a case, if a case was going to be made?” Gohmert asked.

Comey explained that part of the process includes a “queen for a day” procedure in which investigators talk to witnesses or potential witnesses to hear what they might say when testifying before deciding on whether to grant immunity.

The presidential campaign for Clinton, the Democratic nominee, has defended the so-called “limited immunity,” saying it’s “fairly routine" in such investigations.

Comey on Wednesday referred to the deal as “act of production” immunity and said it assures those who cooperate that anything uncovered in their files outside the scope of the investigation cannot be used against them.

Comey also said the immunity was granted by the Justice Department. He called the immunity deal “fairly common” and suggested that Mills’ lawyer asked for the protection.

The FBI’s two-year investigation into the private server found numerous Clinton server emails contained classified information and she was “extremely careless.”

However, the agency concluded the investigation without recommending criminal prosecution, and the Justice Department closed the case this summer.

"It seems clear that former Secretary of State Hillary Clinton committed multiple felonies involving the passing of classified information through her private email server. The FBI, however, declined to refer the case for prosecution on some very questionable bases," Goodlatte said Wednesday. "We, as Congress and the American people, are troubled how such gross negligence is not punished."

Mills’ testimony in the FBI investigation and potential testimony before Congress was not covered in the immunity deal.

Five people were granted some form of immunity in the case including Mills, Samuelson, and former agency IT specialist Bryan Pagliano.

The Associated Press contributed to this report.