California Democratic Gov. Jerry Brown signed a landmark criminal justice bill into law Tuesday making the state the first to abolish cash bail, transitioning toward a system that gives judges discretion to decide who can go home and who must stay in jail pending trial.

Rather than having to buy their release through a bail bondsman or with cash, people will now be released on their own recognizance or under supervision conditions, unless a judge decides they pose a public safety threat and should stay detained.

“A person’s checking account balance should never determine how they are treated under the law,” California Democratic Lt. Gov. Gavin Newsom said. “Cash bail criminalizes poverty, and with Gov. Brown’s signature today, California has opened the door to pursue and perfect a just pretrial system.”

The move comes amid a nationwide push from bipartisan criminal justice groups to overhaul an inequitable bail system that critics say favors the wealthy and punishes the poor, while clogging local jails with people yet to be convicted of a crime. California’s abolition of money bail may be the biggest step to date toward systematic overhaul.

But criminal justice advocates fear the bill might have gone a few steps too far.

After 11th-hour changes to the bill earlier this month, various criminal justice reform groups withdrew their support, fearing the bill would actually lead to an increase in pretrial incarceration because of judges’ generous discretion to decide who is a public safety threat or a flight risk. These criminal justice reform groups fear lawmakers replaced one inequitable system with another, this time plagued by preventive detention rather than poverty. Among those in opposition included the American Civil Liberties Union, Human Rights Watch, Civil Rights Corps and California Attorneys for Criminal Justice.

“We oppose the bill because it seeks to replace the current deeply flawed system with an overly broad presumption of preventive detention,” the ACLU of California’s three executive directors in northern and southern California and San Diego said in a statement.

Under existing law in California — as with many jurisdictions in the U.S. — bail is often set according to a “bail schedule,” a chart of bail amounts that correspond with the charge and the defendant’s criminal history. The new law, which goes into effect in October 2019, would get rid of the bail schedule, aiming to individualize decisions about pretrial release.

People charged with certain misdemeanors would be released within 12 hours without even seeing a judge, while the rest would undergo a “risk assessment,” which would consider a number of factors about the person’s history.