California Governor Jerry Brown has reached a deal with Senate President pro Tem Kevin de León (D-Los Angeles) that will allow a “sanctuary state” bill to pass once it is amended to allow cooperation with federal law enforcement outside of immigration.

In addition, the bill, SB 54, will be amended to allow California’s prisons to communicate with Immigration and Customs Enforcement (ICE), but ICE will not be allowed permanent space in them.

The Sacramento Bee notes additional changes:

The new changes give local police discretion to hold someone for federal authorities if they have been convicted of a serious or violent felony, a misdemeanor punishable as a felony, felony drunk driving, unlawful possession of a deadly weapon, felony drug crimes and other lesser crimes. The new iteration of the bill also gives immigration agents access to interview individuals in jails, which was previously prohibited, and removes a ban on sharing information from databases with immigration authorities.

The Los Angeles Times reports that the bill would still “prohibit police and sheriffs from asking about a person’s immigration’s status, detaining people for U.S. Immigration and Customs Enforcement “hold” requests and participating in any program that deputizes police as immigration agents.”

Bay Area public radio station KQED notes that the amendments come just in time to allow for a vote in the State Assembly. The bill has already passed the State Senate.

The Times reports that the California Sheriffs Association still opposes the bill, while the California Police Chiefs Association is no longer opposed, but neutral.

In a press release, de León said that the amended bill “prevents our state and local law enforcement resources from being diverted to tear families apart. California will protect our communities from the Trump administration’s radical and hateful immigration policy agenda.”

He added:

SB 54 will ensure that state and local police are not diverted from protecting our communities in order to enforce federal immigration laws. The protections provided by SB 54 will also ensure undocumented residents can report crimes and assist in prosecutions without fear of deportation. With the President’s decision to rescind DACA and stepped up ICE incursions into our neighborhoods, SB 54 is needed now more than ever. Along with SB 54, separate lawsuits filed by UC President Napolitano and California Attorney General Becerra challenging President Trump’s decision to roll back DACA present a united front to protect those who are vital to California’s economy and future.

Governor Brown commented, via de León’s office: “This bill protects public safety and people who come to California to work hard and make this state a better place” He did not distinguish between “people” who come legally, as citizens or residents or immigrants, from those who come illegally.

The Associated Press reports that activists hope to use California’s “sanctuary state” bill as a model for other states committed to opposing the Trump administration and the enforcement of federal law.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named one of the “most influential” people in news media in 2016. He is the co-author of How Trump Won: The Inside Story of a Revolution, is available from Regnery. Follow him on Twitter at @joelpollak.