SACRAMENTO — With minor changes to win over moderates, a polarizing California bill to keep California’s law enforcement agencies from cooperating with federal immigration agents cleared a key hurdle Monday and will head to the full Senate for a vote.

Senate Bill 54 is perhaps the Legislature’s highest-profile act of defiance against the Trump administration, which is seeking to enlist the help of local police to carry out its promised crackdown on illegal immigration. The proposal would prohibit local and state agencies from using state resources to communicate with federal agents, with a few exceptions — such as task forces involving federal and local agencies.

“It’s not a matter of ideology. It’s a matter of common sense,” said the bill’s author, Senate President Pro Tem Kevin de León. “Our communities will become more and not less dangerous when local police officers are pulled from their duties to pull otherwise law-abiding maids, bus boys, gardeners and day laborers for immigration violations.”

The bill officially titled the California Values Act advanced Monday on a party-line vote, despite opposition from the California State Sheriffs’ Association and other groups, at a packed and testy Senate appropriations committee hearing. The sheriffs association remained opposed even after the recent amendments, such as one that would ensure the feds receive a 60-day notice before certain violent felons are released from state prison or local custody. Previously, the bill wouldn’t have allowed such explicit communication about an inmate’s release.

Related Articles Vietnamese American felon facing deportation gets backing from California activists, elected leaders

Democrats to investigate claims of forced hysterectomies on immigrants at Georgia detention center

Ninth Circuit: Trump can end TPS protective status of 300,000 immigrants

Judges: Trump can’t exclude people from district drawings

Opinion: Christians must fight Trump attempt to monopolize faith While not enough to convert the sheriffs association, the concession prompted Assemblyman Jim Cooper, a law enforcement veteran and moderate Democrat from Elk Grove, to sign on as a co-author.

SB 54 was advanced as an “urgency bill,” which means it will take effect immediately if it wins support from two-thirds of the Senate and the Assembly and is signed by Gov. Jerry Brown, who has not indicated whether he will support the legislation.

The bill has the support of labor, religious and civil rights groups but has drawn sharp opposition from those who say it will protect criminals, or that the state shouldn’t be going out of its way to shield those who entered the country illegally. The hearing room grew tense Monday at times, with audience observers on each side laughing, applauding, making sarcastic remarks or shushing one another.

One witness who had testified against the measure cursed at Sen. Scott Wiener as the Democratic senator from San Francisco spoke about the fear among his immigrant constituents and the stereotype that undocumented immigrants are more likely to commit crime, a characterization he called “absolute slander.”

Patricia Bates, a Republican from Southern California who serves as vice chairwoman of the Senate appropriations committee, said she worried the state’s policies would leave otherwise law-abiding undocumented immigrants vulnerable to criminals who should be deported. She noted that some violent crimes, including corporal abuse of children and assault with a deadly weapon, were not covered in the new amendment.

“Individuals involved in this kind of crime are predators for people who live in these communities,” she said.

Sen. Jim Nielsen, R-Roseville, suggested more amendments but said he doubted he would ever support such a measure, regardless of its final form. “This will set up a safe haven for criminals,” he said. “They will come to California. Why? They will be protected.”

Related Articles California immigration policy debate brings local law enforcement role into focus

A defiant California legislature fast-tracks `sanctuary state’ bills Sen. Steven Bradford, D-Inglewood, said he, too, had received calls from concerned constituents, and that he appreciated the amendments that de León made last week.

Like his Republican colleagues, Bradford said, “We’re very much committed to making our communities safer.” But, he added, “I think we’d all agree that mass deportation is not the answer.”

Wiener said he worries public safety will be compromised if crime victims or witnesses fear going to the police with information. Anxiety about the Trump administration’s policies on immigration is widespread, he said. “What gives me fear and a lot of people fear,” he said, “is that we have children who are scared to go to school because they’re worried they’ll come home from school and their mom or dad might be gone.”