Immigrants held in Theo Lacy jail in Orange County were served spoiled lunch meats, forced to use dirty showers, and subjected to harsh solitary confinement, among other unsafe conditions, according to a government watchdog.

As a result, officials with the Department of Homeland Security Inspector General’s office on Wednesday said they had called for Immigration and Customs Enforcement (ICE) to address health and safety concerns at the jail, which doubles as an immigration detention facility.

“Because of concerns raised during (our) inspection, we recommend that ICE take immediate action,” the report said.

As of Wednesday, there were 528 immigrants detained at Theo Lacy, according to immigration officials. The jail, which can house about 3,000 other male inmates in separate units, is run by the Orange County Sheriff’s Dept.

During a surprise visit to the jail in November, federal officials found unsafe food handling and unsanitary living conditions in the jail’s immigration units, including moldy bathroom stalls and trash-strewn cells.

Detainees told inspectors that meat was often so rotten they had to wash it before eating.

“Of deepest concern, when inspecting the refrigeration units, we observed slimy, foul-smelling lunch meat that appeared to be spoiled,” the report said.

The meat was also served to immigrants in other Orange County detention and processing facilities. A Sheriff spokesman, Lt. Lane Lagaret, said inmates throughout the county are served the same food.

Immigration officials said Wednesday that food, bathroom, and phone issues at Theo Lacy have been resolved. They also said they have met with the Sheriff’s Department to make sure the center is being run in compliance with the agency’s detention standards.

Immigration agents remain on site at Theo Lacy, according to ICE spokesperson Virginia Kice.

The Sheriff’s Department said all of the concerns raised in the report had been addressed, and that it “remains committed to the health and safety of all immigration detainees housed” in its jails.

In addition to the food safety and other health violations, Wednesday’s report found that detainees accused of violating jail rules were held in solitary confinement for 24-hour periods with no access to recreation or visitors, in violation of ICE detention standards.

Inspectors also reported that immigrants with minor or no criminal records were housed alongside immigrants convicted of serious crimes — another violation of ICE policy. Detainees were not given the opportunity to appeal housing decisions, the report said, and neither the Sheriff’s Department nor federal immigration agents had a system for tracking or addressing grievances from detainees.

While the Sheriff’s Department has taken steps to resolve these issues, the findings highlighted in the federal report are important, said Tom Dominguez, president of the Association of Orange County Deputy Sheriffs.

“We are pleased that the Inspector General’s findings were not of a more serious nature,” Dominguez said.

He added that the union is “hopeful the Sheriff makes further improvements throughout the entire county jail system.”

Immigrant rights advocates heralded the report as a victory, citing a long history of complaints by detainees and advocacy groups against Theo Lacy and the Orange County Sheriff’s Department.

A 2015 federal complaint filed on behalf of 10 immigrant inmates at the jail alleged that sheriff’s deputies physically abused and denied medical treatment to detainees. Last August, several detainees at the jail launched a hunger strike to bring attention to what they said were poor conditions and treatment at the facility.

The jail in 2013 was the subject of an Orange County Grand Jury investigation that found sheriff’s deputies systematically shirked their duties by sleeping in the guard station, playing video games and using jailhouse bullies to punish other inmates.

“After months of inaction by the O.C. Sheriff’s Department and ICE, we are glad to see that the Inspector General has taken our complaints seriously,” said Christina Fialho, executive director of Community Initiatives for Visiting Immigrants in Confinement, which filed the 2015 complaint.

“The federal government needs to end its relationship with the O.C. Sheriff’s Department and stop squandering taxpayer dollars on detaining immigrants in a system rife with human and civil rights abuses,” Fialho added.