California lawmakers on Thursday dealt a blow to the Trump administration's plans to expand capacity for detaining undocumented immigrants in the state.

The provision, which is part of California's $125-billion budget, stops local jurisdictions from signing new contracts or expanding existing contracts with US Immigration and Customs Enforcement (ICE) for detaining immigrants. It also requires the state attorney general to conduct reviews of all detention facilities holding immigrants. The budget plan now goes to the desk of Gov. Jerry Brown, who is expected to sign it.

California's move comes as ICE is seeking a $1.2-billion increase in funding for the next fiscal year. The agency's budget calls for nearly $4.9 billion to expand detention capacity to 51,379, with the ability to hold about 49,000 adults and 2,500 families.

At the same time, the Trump administration has expanded the pool of deportation priorities to include nearly all 11 million undocumented immigrants.

California state Sen. Nancy Skinner, who introduced the language into the bill, cited that expanded pool of possible deportees as a major reason for the new rule.

“That’s just an absurd expansion, which California overall rejects,” Skinner told BuzzFeed News. “We don’t support the president’s broad executive orders and we feel that any detainee should be treated humanely.”

Lucy Nicholson / Reuters

A razor wire fence surrounds the Adelanto immigration detention center, which is run by the Geo Group Inc.

The Golden State is home to nine immigration detention facilities, and all but Otay Mesa Detention Center in San Diego contract with local jurisdictions to hold immigrants. A recent report from Human Rights Watch estimates that 65,000 immigrants are detained in California every year, second only to Texas.

Grace Meng, senior researcher at Human Rights Watch, said it’s an unprecedented move by a state with so many immigrant detainees.

“People think of California as a liberal state that’s anti-Trump and pro-immigrant, but after Texas, it holds more immigrants than any other state,” Meng told BuzzFeed News. “This certainly can’t stop Trump's detention plan singlehandedly, but it’s an important step for a state to take.”

However, Virginia Kice, spokeswoman for ICE, said placing limitations on the agency’s detention options in California won't hinder their efforts.

“It will simply mean ICE will have to transfer individuals encountered in California to detention facilities outside the state, at a greater distance from their family, friends, and legal representatives,” Kice said in a statement to BuzzFeed News.

All ICE detention facilities already meet rigorous performance standards, which are subject to top-to-bottom inspections at least twice a year and unannounced inspections as warranted, she added.

Lucy Nicholson / Reuters

But Christina Fialho, co-founder and co-executive director of Community Initiatives for Visiting Immigrants in Confinement (CIVIC), which helped draft the measure, said the provision is going to add much needed oversight to conditions inside detention centers while stunting their growth.

“While our ultimate goal is to abolish immigration detention nationwide, this is a powerful first step," Fialho said. "California is saying that we're not going to allow President Trump or his administration to expand the immigration detention regime in the state."

California state Sen. Ricardo Lara, who helped push the rule change through the budget, has a pending bill that would also prohibit local governments from entering into or expanding contracts with for-profit companies.

"We are not going to invest in facilities that make a profit from tearing families apart in California," Lara said. "I hope other states understand that and follow our lead."

César Cuauhtémoc García Hernández, assistant professor at the University of Denver Sturm College of Law, said the provision in the state budget was the most far-reaching move a state has taken to limit ICE within its boundaries.

“This poses an enormous obstacle for ICE,” García Hernández told BuzzFeed News. “It also sends a message to advocates in other parts of the country that there is significant room for pushing back against ICE.”

García Hernández said he also welcomed the increased oversight because ICE has largely been reluctant to open its doors to outsiders, making it hard to get information about conditions inside detention facilities.

"Knowing what is happening on the inside of these detention facilities is critical to holding ICE accountable," he said. "If ICE is going to detain people it should feel comfortable holding people in a humane fashion."