By SOPHIA BOLLAG | The Associated Press

SACRAMENTO (AP) — The California State Assembly on Monday narrowly advanced a bill to make California the first state to completely eliminate bail for suspects awaiting trial and replace it with a risk-assessment system.

The bill passed with no votes to spare, revealing the difficult balance of writing a bill that would draw support from both criminal justice reform advocates and lawmakers more aligned with law enforcement. Some reform groups that once supported the bill backed away in recent days, arguing the latest version gives judges too much power to keep people in jail.

Start your day with the news you need from the Bay Area and beyond.

Sign up for our Morning Report weekday newsletter.

The legislation now moves to the state Senate, where lobbying from both sides is likely to continue.

Supporters of the bill argue the current system discriminates against low-income people.

“Our system of justice should not be pay to play,” said Assemblyman Rob Bonta, D-Alameda, one of the co-authors. “This is a huge change for the better. This is transformational.”

Under the bill, SB10, most suspects arrested for nonviolent misdemeanors would be released within 12 hours of being booked, while those facing serious, violent felonies would stay in jail before trial.

Courts and the state’s Judicial Council would have wide latitude to determine whether to release other suspects before trial based on the likelihood they’ll return to court and the danger they pose.

“We’re changing the entire structure of the criminal justice system today,” said Jordan Cunningham, a Templeton Republican, who voted against the bill.

He warned that eliminating bail would prevent some people from being released before trial who would otherwise have been able to post bail. He also argued the measure would allow some dangerous people to get out. He said he believes many will fail to appear in court.

Proponents say the bill will result in fewer people languishing in jail before trial. Opponents on the left argue the bill will do the opposite.

Gina Clayton-Johnson, executive director of the Essie Justice Group, described the bill as a “mass incarceration” policy. Her organization, which represents women with incarcerated family members, was a co-sponsor of the original version of SB10 when it was introduced last year. But the group is now fiercely lobbying against the new version, which she says will put more people behind bars.

“It is dangerous, and it is regressive,” she said during a rally outside the Capitol on Monday.

The bill would make communities less safe because it places too high a burden of proof on prosecutors to keep people in jail before trial, said Assemblyman Tom Lackey, R-Palmdale, voicing a concern from those on the right.

Despite the opposition from both liberal and conservative groups, Assemblyman Reggie Jones-Sawyer says he thinks the current proposal strikes the right balance.

“This bill will end a legalized form of economic discrimination,” the Los Angeles Democrat said.

Many lawmakers said the process on the bill was rushed. The version passed in the Assembly was published online Friday afternoon.

“It’s a crappy bill and it’s going to need a lot of fixes,” said Al Muratsuchi, a Los Angeles-area Democrat. “But I’m afraid if we don’t vote on this bill now, it’s not going to pass.”