California lawmakers passed a bill on Wednesday banning private prisons from operating in the state - a move which will likely also lead to the closure of four large immigration detention facilities that can hold up to a combined 18,000 people, according to The Guardian.

Adelanto detention facility operated by Geo Group

The move is a dramatic shift for California, which used to rely on private prisons to reduce overcrowding in state-run facilities.

Private prison companies used to view California as one of their fastest-growing markets. As recently as 2016, private prisons locked up approximately 7,000 Californians, about 5% of the state’s total prison population, according to the federal Bureau of Justice Statistics. But in recent years, thousands of inmates have been transferred from private prisons back into state-run facilities. As of June, private prisons held 2,222 of California’s total inmate population. -The Guardian

The bill, AB32, has moved to to the desk of Governor Gavin Newsom, who said last year he supported the ban - and committed to "end the outrage of private prisons once and for all" during his January inaugural speech.

There are currently four private prisons in California operated by the Geo Group, whose contracts expire in 2023 and cannot be renewed under the new legislation, unless ordered by a federal court in order to reduce overcrowding.

In addition to signaling a major criminal justice reform, AB32 also has become a flashpoint in California’s fight with the Trump administration over the treatment of immigrants. The bill’s author, the assemblymember Rob Bonta, originally wrote it only to apply to contracts between the state’s prison authority and private, for-profit prison companies. But in June, Bonta amended the bill to apply to the Immigration and Customs Enforcement agency’s four major California detention centers. Bonta’s amendment, say immigrant rights advocates, appears to have caught Immigrations and Customs Enforcement (Ice) and the private prison companies at a moment when their current contracts are expiring. The result is that instead of slowly phasing out immigration detention centers as their existing contracts expire years down the road, most will face closure next year – unless Ice and its private prison contractors find a workaround. -The Guardian

"I think Geo Group is realizing their scheme to circumvent state law is putting them in a place where they could end up being be nailed," said immigration attorney Hamid Yazdan Panah, who serves as the regional director for the Northern California Rapid Response & Immigrant Defense Network.

In 2011, the city of Adelanto signed an agreement with ICE to detain up to 1,300 immigrants facing deportation. Adelanto then subcontracted with Geo Group under a complicated arrangement which California's state auditor allowed ICE and Adelanto to forgo a competitive bidding process.

"What Ice does is they locate in these very poor and remote areas," said Lizbeth Abeln, of the Inland Coalition for Immigrant Justice. "The private prison comes in and lobbies and promises jobs, and tax money."

A similar process unfolded just north of Bakersfield in McFarland, where in 2015 the city agreed to serve as the middleman for the Geo Group, which operates the 400-bed Mesa Verde detention facility. Geo Group expanded the Adelanto center in 2015 to 1,940 beds, making it the second-largest adult detention center in the country, and with the Trump administration’s crackdown against undocumented immigrants, another 1,000-bed expansion is planned. Last year, Geo Group reportedly sought to purchase property in Bakersfield for a major expansion of Mesa Verde. -The Guardian

Under last year's Dignity Not Detention Act, Adelanto, McFarland, and other cities and counties were prohibited from signing new agreements with ICE or amending existing contracts to allow for the expansion of permits.

"To expand their detention center, Geo Group and Ice would have to cut their ties with the city of Adelanto," said California Immigrant Youth Justice Alliance communications coordinator, Jose Servin.

In San Diego, CoreCivic operates the detention center in Otay Mesa under a direct contract with ICE, while the construction of a 512-bed expansion is underway, according to SEC filings. That said, its contract expires in June 2020 and will not be renewed under AB32.

According to CoreCivic spokesman Brandon Bissel, "When California’s prison system capacity was at 200% and conditions were so challenging as to be deemed unconstitutional, companies like ours were one of the solutions the state turned to."

Both CoreCivic and the Geo Group spent a combined $132,000 lobbying against AB32.