Cheryl Mills, Hillary Clinton's former chief of staff, received an immunity deal from the Justice Department during the year-long FBI investigation of Clinton's server.

Two other State Department staffers, John Bentel and Heather Samuelson, were also given immunity agreements, bringing the total number of witnesses who were protected by deals to five.

Bryan Pagliano, Clinton's former IT aide, and Paul Combetta, an employee at the firm hired to manage her server after she left the State Department, received such protection through deals that were reported previously.

The immunity agreements given to Mills and Samuelson covered the evidence recovered from their computers, a Democratic staffer told the Washington Examiner. The deals did not extend to their testimony before Congress or to the information they told the FBI, the staffer said.

Pagliano was held in contempt of Congress Thursday for his failure to comply with a subpoena for testimony and documents. Combetta appeared before the House Oversight Committee last week, but invoked his Fifth Amendment rights and refused to answer questions.

The FBI has said Clinton and her staff exhibited "extreme carelessness" by sharing classified information on an unsecured server that was kept in Clinton's basement.

Rep. Jason Chaffetz, chairman of the House Oversight Committee, said the immunity deals were "beyond explanation."

"I've lost confidence in this investigation and I question the genuine effort in which it was carried out," Chaffetz said in a statement. "Immunity deals should not be a requirement for cooperating with the FBI."

The Utah Republican said the FBI was "handing out immunity agreements like candy."

Mills testified in May that she did not know Clinton had used a private server to host her emails, telling conservative-leaning Judicial Watch in a deposition that she did not recall most details about the former secretary of state's email use.

Mills also invoked attorney-client privilige over some of what she and Clinton had said in discussions about the emails, as Mills was permitted to serve as counsel for the Democratic nominee in addition to her role as a witness in the investigation against her.

Samuelson, who enjoyed the same type of immunity deal given to Mills, was tasked with sorting through Clinton's emails in 2014 after the State Department asked Clinton to turn over her work-related records. As such, investigators feared Samuelson had stored potentially classified materials on her computer.

Under the deal provided to Samuelson, the Justice Department would not prosecute her for any classified emails discovered on her hard drive if the former aide agreed to relinquish her computer to the FBI.

The Associated Press first reported Mills' immunity agreement.

Members of the House Oversight Committee have spent weeks poring over files provided to Congress by the FBI from its closed investigative file. While much of the information given to lawmakers remains highly classified, the documents have raised more questions about why FBI Director James Comey concluded there was no evidence of intentional lawbreaking in the actions taken by Clinton and her staff.