“HE WAS listed as a three, your honour.” “He’s a two on the raw score.” “On danger to the community, he scores a five.” The defendant, a lean, bearded man in an orange jumpsuit and shackles, sits next to his lawyer, listening intently to his rankings on a six-point scale. Welcome to the world of pre-trial hearings in New Jersey, which on January 1st became the first state to eliminate almost completely the use of bail. Instead of relying on hunches, or a fixed schedule matching bail amounts to crimes and lawyers’ arguments to set bail, judges there now use a nine-factor algorithm to assess whether a defendant is dangerous or likely to flee. Those thought to be in either category can be detained; the rest are released, but monitored.

Defenders of New Jersey’s experiment point to a dramatic decline in the state’s jail population, driven by a reduction in the number of poor, non-dangerous offenders who are incarcerated while awaiting trial for no other reason than their inability to pay bail. In September 2017 New Jersey’s jails held 36% fewer people than they did in September 2015. (Under American law, those in custody awaiting trial and those serving short sentences go to “jail”; the rest of the convicted serve time in “prison”.) About 440,000 people are detained awaiting trial in America on any given day, or nearly a fifth of the total number put away.

Opponents of what New Jersey is up to worry that the law lets dangerous criminals back onto the streets. But reform is catching on across America. Some of the changes are legislative. The California Senate’s Public Safety Committee has approved a bill much like the one that passed in New Jersey. The New Orleans City Council passed a measure banning cash bail for misdemeanours; Connecticut has also limited misdemeanour bail. Kamala Harris and Rand Paul, a Democratic senator from California and a Republican one from Kentucky respectively, introduced a bill encouraging states to move away from money bail, and to implement pre-trial risk-assessment programmes based on evidence. In 2016 and 2017 Illinois, Montana, New Mexico and Alaska all passed measures likely to reduce the use of cash bail, and ensure the pre-trial freedom of more poor defendants.

Sometimes courts have led the charge. Last April a federal judge in Harris county, Texas—home to America’s third-largest jail—found its system of misdemeanour bail unconstitutional because it detained people simply because of their inability to pay. (Harris county has appealed.) In Cook county, Illinois, a judicial order directing judges to limit bail to amounts defendants can afford went into effect in September; judges in Arizona, Maryland and elsewhere have issued similar decrees. Suits brought in various cities have contended that cash bail violates the 14th Amendment’s equal-protection clause, sending people to jail purely because they cannot afford bail.

The American Civil Liberties Union (ACLU) sued Randolph county, Alabama, for instance, for jailing Kandace Edwards, an army veteran who was seven months pregnant, because she could not afford a $7,500 bond after being arrested for forging a $75 cheque. A study of the jail population in New Jersey before bail-reform legislation found that 12%—more than 1,500 people—were locked up solely because they could not afford a bond of up to $2,500. Extrapolating that rate nationally means that around 76,000 people are sitting in jail for want of a few thousand dollars.

That has lasting costs. A study by the Arnold Foundation, which created the pre-trial assessment system used by New Jersey, found that even brief pre-trial detention for low- and moderate-risk defendants corresponds with higher reoffending rates for years. Alexander Shalom, a former public defender in Newark who now works for the ACLU in New Jersey, said he would routinely defend clients against whom the prosecution had weak cases. But when offered the choice between taking their case to trial—and sitting in jail for a year or two before then—and pleading guilty to time served and just going home, many chose jail.

Bail also leads judges to game the system. State constitutions often require bail for people arrested on non-capital charges. But in the name of public safety judges use high bail to keep people locked up, without going through the rigorous process that the Supreme Court says is necessary to detain people without trial. This hurts poor defendants but allows rich, dangerous ones to buy their freedom. Bail reform in New Jersey changed this by introducing a right to remand anyone arrested who is deemed dangerous.

But David Feige, who with his wife, Robin Steinberg, founded the Bronx Freedom Fund, a charity that bails out people arrested for misdemeanours, calls this standard “a dangerously elastic concept [that] expands every time there’s another headline.” The point of bail, he argues, is to get people to return to court; and over a decade of bailing out thousands of defendants, less than 5% have skipped. Both he and officials in New Jersey have found that the surest way to get defendants to show up is to bombard them with messages reminding them of their court date.

Ras Baraka, Newark’s mayor, believes that too few people are being detained. He says that those arrested and released in his city have gone on to commit more crimes. “People caught who’ve done seven, eight, nine burglaries, it doesn’t make sense to let them out so they can do 11, 12, 13 more,” says Mr Baraka. Yet he still supports reforms that make it easier for poor people accused of petty crimes to go home. Courts and legislatures around the country increasingly take the same view. New Jersey’s experiment with bail reform may be the biggest and boldest; it will not be the last.