The changes made this week got Brown and the police chiefs association on board, but the powerful California State Sheriff's Association remains opposed, saying they don't want any limits on their communications with ICE.

"While a good portion of our suggestions were ultimately incorporated, the bill still goes too far in cutting off communications with the federal government," Santa Barbara Sheriff Bill Brown, who heads the statewide association, said in a written statement. "In the end, we cannot support legislation that limits our ability to protect our communities in a symbolic attempt to impact federal law and policy."

De León, who introduced the bill just weeks after President Donald Trump's election, told KQED's Forum program on Tuesday that while the bill doesn't have everything he originally wanted, it will go a long way toward protecting immigrants and preserving their trust in local police agencies.

"This will be the most far reaching progressive policy of its kind in the nation," he said. "It’s a win- win for public safety, it’s a win-win for the community based organizations who worked tirelessly to lobby the legislative body and the governor."

It's unclear how the Trump administration will respond to the the amended bill. The Department of Justice has already moved to cut off federal law enforcement grants to so-called sanctuary cities like San Francisco, which prohibit cooperation with ICE. The state joined San Francisco and Santa Clara counties in a suit challenging that funding threat; but it remains to be seen if the Justice Department will consider the entire state ineligible for those grants under SB54.

Among the other changes made to the bill:

The legislation will preserve the ability of law enforcement officers to cooperate on federal task forces as long as the task forces do not specifically target immigration enforcement. It will also allow federal authorities access to statewide databases that could give them valuable information about undocumented Californians.

None of the restrictions in the bill will apply to state prisons. And while ICE won't be allowed to rent office space and permanently station officers inside local jails -- as is now the case in Fresno County -- SB54 won't prevent ICE agents from interviewing people who are in the custody of local jails. Currently, Fresno, Kern and Stanislaus counties currently allow ICE agents to interview jail inmates.

In the most major concession to law enforcement concerns, de León agreed to allow sheriffs to talk to ICE about certain people in their custody. Under the measure, sheriff's agencies can pass on information about people who are in jail and were previously convicted of one of 800 crimes -- mostly felonies -- in the past 15 years.

But in general, the bill seeks to draw a bright line between local police agency's work and that of ICE. For example, the bill would prohibit the Orange County Sheriff's Department from allowing jail guards to act as immigration agents under a federal partnership called the 287(g) program.

The bill has passed the state Senate but has faced a tougher test in the more moderate Assembly. With the changes -- and Brown's support -- backers think the Assembly will easily pass the measure by Friday, the annual legislative deadline.

Brown has until Oct. 15 to sign or veto bills passed by the Legislature.

[sb54amend]