THE IDEA of using objective criteria to decide which criminal defendants are freed pending trial and which are thrown in jail may sound slightly chilling. For starters, who’s to say what’s “objective”? Sabermetrics may have improved a baseball manager’s ability to forecast a player’s performance, but can statistical analysis really predict defendants’ flight risk and fairly determine the limits of their liberty?

That’s the quandary facing lawmakers in Maryland as they wrestle with reforming a bail bond system in such a shambles that a state court has ordered it overhauled. To replace the system, the Maryland Senate has embraced legislation that would establish a new agency that would employ computer modeling to decide which defendants can go home to await trial.

The measure is backed by Gov. Martin O’Malley (D) and legislative leaders in Annapolis, but it faces skeptics, particularly in the House of Delegates, which has not yet voted on it. They wonder whether it’s wise to replace the judgments of trained commissioners with rulings guided by a machine.

The question was forced on lawmakers by Maryland’s Court of Appeals, which declared the current procedures unconstitutional. The court based its ruling partly on the fact that many defendants have no lawyers when their bail is decided by district court “commissioners,” who often are not attorneys. Too many defendants are incarcerated for too long, often without just cause, the court said.

The ruling presented a stark choice: If they retained the current system, legislators would have to find up to $50 million a year to provide all defendants with lawyers at their initial bond hearings; some prosecutors’ offices would have to increase staffing. Or lawmakers could establish a new system. The Senate chose the latter, despite apocalyptic rhetoric from some senators who issued dark warnings of an assault on defendants’ civil rights.

Its plan would create a pretrial services agency, reporting to the governor, that would make bond determinations based on the alleged crime, a defendant’s criminal history and other factors weighted according to extensive data about flight risk gathered elsewhere. The District and Kentucky use similar systems, which have worked well.

In many cases involving relatively low-level crimes, defendants would be released without having to post cash bail. Unsurprisingly, bail bondsmen have lobbied heavily to defeat the Senate legislation, which would cut into their business. (Cash bail could still be imposed by judges in some cases.)

A state agency could monitor pretrial defendants aggressively (ankle bracelets) or passively (automated phone calls reminding them to appear in court). Montgomery County has used such a system successfully for years; as a result, many in the criminal justice system there regard the bond system as a superfluous moneymaker for bondsmen.

According to the bill’s sponsor, Sen. Brian E. Frosh (D-Montgomery), using objective criteria assisted by a computer yields better results than those from court commissioners and leaves defendants no less likely to appear in court. The cost to the state would be considerably less than overhauling the current, deeply flawed system.

That makes sense to us. There may be no perfect system for setting pretrial limits on the liberty of defendants. But the current method seems imperfect in the extreme.