SAN FRANCISCO (AP) — The California Supreme Court ruled Thursday that judges must consider suspects’ ability to pay when they set bail, essentially requiring that indigent defendants be freed unless they are deemed too dangerous to be released awaiting trial.

“The common practice of conditioning freedom solely on whether an arrestee can afford bail is unconstitutional,” the justices said in a unanimous decision.

READ MORE: Twitter To Pay $809 Million To Settle Class Action Lawsuit Brought By Investors

Judges can require electronic monitoring, regular check-ins with authorities or order the suspect to stay in a shelter or undergo drug and alcohol treatment, the justices said — conditions that “in many cases protect public and victim safety as well as assure the arrestee’s appearance at trial.”

However, “what we hold is that where a financial condition is nonetheless necessary, the court must consider the arrestee’s ability to pay the stated amount of bail — and may not effectively detain the arrestee ‘solely because’ the arrestee ‘lacked the resources’ to post bail.”

There are times when protecting the community means the suspect cannot be released at all, they said, but then “a court must first find by clear and convincing evidence that no condition short of detention could suffice.”

The decision comes after voters in November rejected a state law that would have ended California’s cash bail system entirely by substituting risk assessments for every suspect, and after months when a judicial order set bail at zero for lower-level offenses during the coronavirus pandemic. The court’s ruling allows cash bail, so long as defendants can afford it.

The justices adopted the same argument that state lawmakers used in passing the 2018 law ending cash bail, and that is driving new proposed legislation that would set bail at $0 for misdemeanors and low-level felonies.

While it considered the case, the high court in August took the extraordinary step of requiring California judges to follow a lower court ruling and set bail amounts based on what suspects can afford to pay.

Bail is money or property that can be forfeited if suspects fail to appear for trial. If the suspect can’t afford bail, judges can consider alternatives like releasing them on their own recognizance, potentially with restrictions like ankle monitors.

READ MORE: KPIX Original Report: SF Mission Bay Sidewalks Sinking But City Won't Fix 'Private Property'

Previously, judges set bail based on suspects’ criminal records and pending charges. Critics said that let wealthy suspects go home to prepare for trial while lower-income defendants stayed locked up, a system they said encouraged some innocents to plead guilty to get out of jail.

The appeals court ruling had support including from then-Attorney General Xavier Becerra, who said judges should consider if suspects are dangerous or likely to flee when deciding whether to keep them in jail while awaiting trial.

Becerra was confirmed last week as President Joe Biden’s health and human services secretary, and Gov. Gavin Newsom on Wednesday nominated Assemblyman Rob Bonta to replace him. Bonta is one of the Legislature’s main proponents of ending cash bail, backing both the law rejected by voters and identical Assembly and Senate bills this year that would set bail at $0 for low-level felonies and misdemeanors.

“The jailhouse door should not swing open and closed based on how much money someone has,” Bonta said in January when he and other Democratic lawmakers introduced the new legislation. “There is no disputing the present system wrongly treats people who are rich and guilty better than those who are poor and innocent.”

Judicially creating a new “ability to pay” consideration would violate the Victims’ Bill of Rights Act, also known as Marsy’s Law, approved by California voters in 2008, the Criminal Justice Legal Foundation argued in a friend of the court brief.

The foundation, which represents the interests of crime victims, contended that making cash bail contingent on suspects’ ability to pay violates state law, which allows for considering the safety of the public and victim, the seriousness of the alleged crime, the suspect’s criminal record, and the likelihood that he or she will flee.

The high court’s ruling came in the case of 66-year-old Kenneth Humphrey of San Francisco, who was jailed for more than eight months because he couldn’t post $350,000 bail on charges of stealing $5 and a bottle of cologne from a neighbor in a senior housing complex in May 2017.

The Association of Deputy District Attorneys in Los Angeles County noted that Humphrey has a long criminal record and so faced a potentially long prison sentence on charges including robbery and residential burglary. He is alleged to have demanded money from a 79-year-old man who uses a walker, then followed the victim into his apartment where he stole the items.

MORE NEWS: Motorcyclist Airlifted To Hospital After Crash Near Bethel Island

© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.