A sheriff's deputy talks to an immigration detainee in a high-security housing unit at a jail in Orange County, Calif., in 2017. (Robyn Beck/AFP/Getty Images)

Public and private contractors running immigration jails violated federal detention standards thousands of times in recent years — including failing to report allegations of sexual assaults and staff misconduct to U.S. Immigration and Customs Enforcement — but were fined only twice, according to a report issued Friday.

The Department of Homeland Security’s inspector general called on ICE to improve oversight of facilities that detain roughly half the 45,000 immigrant detainees held every day across the United States, and to do a better job holding federal contractors accountable for their health and safety.

ICE defended its oversight in a letter to the inspector general that was included in the report and said generally it can terminate contracts or relocate immigrants if it believes facilities are unsafe.

ICE documented 14,003 violations from Oct. 1, 2015, through June 30 at 106 facilities nationwide, the report said. The fines assessed by the agency amounted to $3.9 million, or 0.13 percent of the more than $3 billion ICE paid to the contractors during that period.

One facility was fined after “a pattern of repeat deficiencies over a 3-year period, primarily related to health care and mental health standards,” the report said. Another fine followed a Labor Department order against the facility for failing to pay proper wages.

In other cases, the inspector general found, immigration officials granted waivers allowing some contractors to bypass detention standards or avoid punishment for violations. From September 2016 through July, 65 waivers were approved — most for indefinite time periods.

One waiver authorized a facility to use CS gas, or tear gas, even though it is 10 times as toxic as pepper spray.

Another allowed a facility to house detainees who had serious criminal records along with others who had minor records or only immigration violations, a practice that is normally prohibited “to protect detainees who may be at risk of victimization or assault.”

The inspector general said immigration officials lacked formal policies to oversee waivers and that some officials “without clear authority” were granting them.

“Key officials admitted there are no policies, procedures, guidance documents, or instructions to explain how to review waiver requests,” the report said.

The inspector general issued recommendations urging ICE to shore up its oversight of detention facilities and ensure paperwork is included in contracts that will make clear when the agency should impose penalties on contractors that fail to follow federal rules.

In a letter to the inspector general that was included in the report, ICE agreed to make improvements but countered that it has taken strong steps in the past to safeguard immigrant health and safety, even shutting down some facilities because of violations.

“ICE has a strong record of holding detention facilities accountable when deficiencies are identified,” spokesman Matthew Bourke said in a statement.

He said the waiver process in the inspector general’s report is a “rarely used mechanism.”

The report comes as the White House and Congress are preparing for a heated battle over detention funding, building a wall on the southern border and other aspects of President Trump’s immigration crackdown. This week, Democratic lawmakers unveiled a proposal to “significantly” reduce ICE detention beds, require more detention facility inspections, and limit ICE’s leeway to detain more immigrants than Congress allows.

As of Jan. 26, the agency was detaining an average of 45,670 immigrants a day this fiscal year, which is about 5,000 more than Congress has authorized in the budget.

The 106 facilities in the report housed an average of 25,000 immigrants a day as of fiscal year 2017. They are under ICE’s direct oversight. About 100 other facilities are run by the U.S. Marshals Service and are not included in the report.

ICE contractors are required to comply with detention standards that outline their responsibilities, the services they must provide to immigrants and what each facility must do to provide a “safe and secure detention environment for staff and detainees,” the report said.