SACRAMENTO, Calif. (AP) — Lawmakers on Friday sent Gov. Jerry Brown a bill that would protect illegal immigrants who commit minor infractions from deportation.

AB1081, known as the Trust Act, would allow California to opt out of some parts of the federal Secure Communities program. That program requires local law enforcement officers to check the fingerprints of people they arrest against a federal immigration database and hold those who are in the country illegally.

Assemblyman Tom Ammiano, D-San Francisco, said the policy wastes resources and drives a wedge between immigrants and law enforcement agencies.

"Victims of crime, including domestic violence, are fearful of risking separation from their families and deportation," he said.

Several GOP lawmakers spoke against the bill Friday, saying it would take away an important tool for ridding California of law-breakers.

"This has become the be-kind-to-criminals Legislature," said Assemblyman Jim Nielson, R-Gerber.

AB1081 passed the Assembly on a party line, 44-23 vote after a lengthy debate.

As the debate became more heated, Ammiano said some of the bill's Republican opponents had "been in the sun too long building that silly fence," drawing a reprimand from Democratic house leadership.

The Trust Act would prevent local law enforcement officers from detaining arrestees for possible deportation unless the suspect had been charged with a serious or violent felony.

The bill has been dubbed "anti-Arizona" legislation, a reference to that state's immigrant identification law. Supporters argue that the Secure Communities program targets otherwise law-abiding immigrants who commit minor traffic infractions, sell food without a permit or are arrested on misdemeanors charges but never convicted.

The federal government has deported tens of thousands of people under the Secure Communities program, with the majority coming from California.

Since 2009, California law enforcement officials have turned over about 80,000 illegal immigrants for deportation; fewer than half had committed a serious or violent felony.

Trust Act advocates have long expected Gov. Jerry Brown, who previously served as California's attorney general, to present the biggest hurdle to the bill's passage. The Democratic governor has not taken a position on the legislation, according to spokesman Gareth Lacy.