For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

With its new budget, California is doubling down on its resistance to President Donald Trump’s agenda, and particularly his crackdown on undocumented immigrants. Language in the budget, which passed the legislature on Thursday and is expected to be signed by Gov. Jerry Brown, would make California the first state in the country to ban local and county jails from increasing the number of undocumented immigrants they house or entering into new contracts to detain these immigrants.

California has positioned itself as the epicenter of the legal and political fight against the president. Brown is aggressively pursuing state-level and international partnerships to counteract Trump’s decision to leave the Paris climate agreement. As Republicans in the US Senate secretly draft a health care bill that is likely to cause millions of additional Americans to go without insurance, the state Senate overwhelmingly passed a single-payer health care bill. When it comes to immigration enforcement, the state Senate has approved a sanctuary state bill that would prevent state and local police from assisting federal immigration authorities.

This year’s state budget also takes the unprecedented step of giving state Attorney General Xavier Becerra the authority to monitor conditions at both public and private detention centers. The broad authority is important because private facilities house about 75 percent of immigrants detained in California, according to Community Initiatives for Visiting Immigrants in Confinement (CIVIC), an immigrant rights advocacy group. Grisel Ruiz, a staff attorney at the Immigrant Legal Resource Center (ILRC), calls the budget language a groundbreaking advancement for the country’s “broken immigration detention system.”

Numerous reports have highlighted immigration detention centers’ substandard medical care and protection from abuse. Following the 2015 death of Raul Ernesto Morales-Ramos, a US Immigration and Customs Enforcement investigation found that the medical care he received in detention violated many of ICE’s standards. HuffPost recently reported that 10 detainees have died in ICE custody since the fiscal year began on October 1st—the same number that died in all of the 2016 fiscal year. A recent report from CIVIC found that the Department of Homeland Security’s inspector general’s office investigated only 2.4 percent of sexual abuse complaints.

State Sen. Ricardo Lara, who led the push for the moratorium, is sponsoring another bill that would prevent local officials from contracting with companies to build or expand detention facilities. The bill has passed the state Senate and is now being considered by the Assembly.

ICE has requested $4.9 billion to increase immigration detention nationwide. In a statement, ICE said that limiting detention in California “won’t prevent the agency from detaining immigration violators. 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.”

CIVIC and ILRC eventually hope to eliminate immigrant detention facilities entirely. They argue there is no reason why immigrants who are not being held for criminal activity should remain in detention facilities why they await possible deportation. But Christina Fialho, CIVIC’s co-founder and co-executive director, says the California legislature’s move “is a powerful first step in the state with the largest immigrant population in the country.”