Orange County is getting out of the immigration detainment business.

The county is ending its contract with the U.S. Immigration and Customs Enforcement agency, (ICE,) to better focus on the mental health and substance abuse needs of its general inmate population, Orange County Sheriff Don Barnes announced Wednesday

“Since 2015, we have seen a 40 percent increase in open mental-health cases in our jails,” Barnes said in a statement. “The number of mental-health cases now reach almost 1,800 on any given day. Consequently, we must focus on enhancing our mental-health services and expanding the number of beds available for individuals with mental-health needs.”

RELATED: Adelanto to end immigrant detention contract with ICE, GEO Group

Federal immigration officials were notified on Tuesday that the county was ending its contract and ICE was officially notified Wednesday morning, Sheriff’s spokeswoman Carrie Braun said.

An ICE spokeswoman said the decision “will negatively impact local ICE operations” and that the effects will be felt by detainees who will be moved to other facilities – likely out of state – over the next four months.

“Now, instead of being housed close to family members or local attorneys, ICE will have to depend on its national system of detention bed space to place those detainees in locations farther away reducing the opportunities for in-person family visitation and attorney coordination,” ICE spokeswoman Lori Haley said in an e-mail.

Advocates for immigrants expressed concern about the possible transfer of detainees.

“We are profoundly concerned about the fate of the immigration detainees in OCSD’s custody, and what the future holds for them,” said Sameer Ahmeed, an attorney with the Southern California affiliate of the American Civil Liberties Union.

“(The sheriff’s department) is wrong to suggest that all individuals must be transferred to other facilities. We demand that ICE release as many individuals as possible to ensure they remain close to their families, friends, communities, and attorneys.”

Freedom for Immigrants, a California-based organization that helps volunteers visit immigrants in detention, said it welcomes Barnes’ move to terminate the contract and looks to the sheriff “to ensure a just and proper closure of the facility.” But organization spokeswoman Liz Martinez also expressed hope that the county will release detainees “so they can continue their cases on the outside, through the help of community-based alternatives to detention.”

Orange County houses some 700 civilian immigrant detainees – people who are awaiting deportation or immigration court hearings – at the James A. Musick and Theo Lacy facilities. In all, the county holds about 6,100 people in four facilities, which also includes a central jail complex and an intake release center.

The jail shakeup includes upgrading three existing housing modules at the Central Jail Complex in Santa Ana and building a new Musick facility near Irvine. All inmates at Musick will be moved to other local facilities before the construction, Braun said.

The decision to end the ICE contract was a matter of dollars, not politics, Braun said. About 30 percent of Orange County’s inmates require “various levels of mental-health services” – a number that Barnes said has “been increasing exponentially over the last five years.”

“The sheriff needed to make a business decision,” Braun said. “This is not a response to the political rhetoric that is surrounding ICE.”

The department would have had to hire another 40 deputies and spend $6 million to address the mental health and substance use issues of its inmates had it not made the decision to terminate the ICE contract, Braun said. Ending the ICE contract “is the fastest, more cost effective way for us to be able to meet that need.”

The Orange County Sheriff’s Department plans to continue to working with ICE when it comes to connecting the federal agency to some immigrant inmates, as allowed under California’s sanctuary state law.

“The sheriff has every intention to work with ICE,” Braun said, referring to the release of inmates who are immigrants sought by ICE after those inmates complete their sentences. California’s sanctuary law does allow such coordination depending on the criminal record of the inmate.

Barnes said that move to terminate its contract with ICE would have no impact on public safety, noting the department will continue to alert immigration officials to the “release of serious and violent offenders within our custody.”

The Orange County Sheriff’s Department also will continue to post the release date of all its inmates, Braun said. That allows ICE to pick up people for immigration detention as they’re being released. The posting of such information was criticized in a report released Wednesday from the Asian Americans Advancing Justice watchdog group, which said Orange County and other sheriff’s departments in California are exploiting an exemption in the sanctuary law, possibly to get around it.

Angela Chan, a senior attorney with the watchdog group and the report’s project supervisor, said Orange County’s decision to end its ICE contract follows moves by two other departments, in Contra Costa and Sacramento, that also got out of the detention business. Other agencies, nationally, also have ended ICE detention contracts. The Santa Ana City Jail, which once held the nation’s first dedicated module for transgender people detained by ICE, stopped taking immigrant detainees in 2017.

Public and privately-run facilities that hold immigrant detainees while they await their day in immigration court increasingly are under scrutiny. Several reports in the past year have criticized California facilities, corroborating complaints from detainees and their attorneys about poor conditions, inadequate medical care, and insufficient access to lawyers and family.

One of the reports, from the California State Auditor, said that the ICE contract appeared to be costing Orange County money instead of bringing in revenue. The county spent $1.7 million more than what it took in from ICE during the 2017-18 fiscal year, the auditor said. But Sheriff’s officials argued that the rate included indirect costs, like electricity and water, and that the ICE contract did not cost the county money. Another report, from the California Attorney General, described the Theo Lacy facility as providing “a highly restrictive environment” and that disciplinary segreation for minor offenses in Theo Lacy is “alarming.”

Orange County has leased out beds in its jails to ICE since 2010, and the agreement was set to expire in July 2020 prior to Barnes calling an early end to the deal. The federal government pays Orange County $120 per bed per day.

To make up for the loss of revenue from the ICE contract, Barnes announced the Sheriff’s Department will temporarily close its inmate housing operations at the Musick facility, which is on county-owned land between Irvine and Lake Forest.

For years, the Sheriff’s Department has sought an overhaul of Musick to bring a state-of-the-art jail to a minimum-security institution better known for its relatively low-key structures and agricultural setting. Those expansion efforts have been opposed by officials and residents in neighboring Irvine and Lake Forest.

After closing Musick, sheriff’s officials plan to build two state-funded housing facilities on the property, one holding 512 beds and another with 384 beds. They look to complete the work by 2022.

Once re-opened, the jail population at Musick is expected to retain both inmates requiring mental-health assistance and minimum-security inmates, Braun said. “This is utilizing the available resources we have to meet the needs of inmates in our custody.”

Along with the end of the ICE contract, and the temporary closure and construction at Musick, the Sheriff’s Department indicated it will add 500 beds for people with mental health needs at the Intake Release Center, which along with the Men’s and Women’s Jail comprises the Central Jail Complex in Santa Ana.

Staffing will be increased at the Intake Release Center, and redesigned and remodeled privacy partitions will be created to help screen inmates for medical and mental-health issues.

“We are obligated to do everything we can to provide care for the inmates in our custody and connect them to services,” Barnes said. “We have a shared interest in rehabilitating inmates with mental-health challenges and substance-use disorders to be stable and sober, with the ultimate goal of having them not return to jail.”