LOS ANGELES (Reuters) - California moved to end the use of private, for-profit lockups in America’s largest state prison system as well as in federal immigration detention centers in the state under a measure signed into law on Friday by Governor Gavin Newsom.

FILE PHOTO: California governor Gavin Newsom stands next to an American flag as he waits to speak at a news conference in San Diego, California, U.S. October 9, 2019. REUTERS/ Mike Blake/File Photo

The new law bars the California Department of Corrections and Rehabilitation from entering into or renewing a contract with a private company to run a state prison after Jan. 1, 2020, unless needed to meet court-ordered inmate housing limits. It will ban California from incarcerating anyone in privately run facilities altogether from 2028.

The measure, which passed the California legislature last month, does not apply to privately owned prisons operated and staffed by the state corrections agency.

Newsom said in a statement that he had vowed to abolish private prisons in the state when he took office in January “because they contribute to over-incarceration, including those that incarcerate California inmates and those that detain immigrants and asylum seekers.”

“These for-profit prisons do not reflect our values,” Newsom said.

Supporters of the bill have argued that private prisons are driven to maximize shareholder profits, lack proper oversight or incentives to rehabilitate inmates and have contributed to a culture of mass incarceration by making it cheaper to lock up people.

A total of seven low-security facilities collectively housing more than 5,000 people are at stake, all of them operated either by Florida-headquartered GEO Group, or Tennessee-based CoreCivic.

Defending their business model, the companies said they provided vital extra space when detentions in California’s prisons swelled to more than double the system’s capacity, sparking lawsuits that led to court-ordered cuts to inmate populations.

“For 10 years, we provided safe, secure housing and life-changing re-entry programming for inmates that had faced extreme overcrowding,” CoreCivic spokeswoman Amanda Gilchrist said.

Separately, GEO Group cited its record as “an innovator in the field of rehabilitative services” and said the bill worked against the state’s goal of lowering inmate recidivism.

DETENTION CENTERS TO CLOSE

The last three remaining privately run prisons in California’s corrections system, housing a total of 1,400 inmates, are set to close in four years under the new law when their contracts with the state expire.

Perhaps more significantly, the federal Immigration and Customs Enforcement (ICE) agency stands to lose four privately run detention facilities holding roughly 4,000 people in California, unless the ban is challenged in court.

In a statement, GEO Group called California’s newly enacted prohibition on privately run ICE detention centers a violation of the U.S. constitutional doctrine granting the federal government supremacy over the states, suggesting a legal challenge might be in the offing.

ICE had said separately before the legislation was signed that its detainees would merely be transferred to facilities outside California, forcing friends and family of the detainees to travel greater distances to visit their loved ones.

Several states, including New York, Illinois and Nevada, have adopted similar bans on private prisons, and nearly half of all states have no such facilities, said Kara Gotsch, director of strategic initiatives for the Sentencing Project, a criminal justice reform group.

California’s share of inmates in private facilities is a small fraction of its total prison population of nearly 126,000.

By comparison, Texas, which became the first state to outsource incarceration to private companies in 1985, had far more inmates than any other state in for-profit facilities in 2017 at nearly 13,000, or 7.8 percent of its total, said Gotsch.