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

The unanimous decision Thursday comes after voters in November rejected a state law that would have upended California’s cash bail system, and after months when a judicial order set bail at zero for lower-level offenses during the coronavirus pandemic.

The justices held that the state’s bail system cannot discriminate against suspects based on their financial status, rejecting arguments that the decision violates victims’ rights.