A measure that would eventually create a new statewide pretrial unit in Maryland to determine who should be freed and who should be held in jail pending trial moved forward Tuesday in after a tense debate in a Senate panel.

The amended legislation — which represents an effort by Gov. Martin O’Malley (D) and the House and Senate leadership to address court decisions critical of Maryland’s use of pretrial confinement — would create a commission and set up a pilot program in several unspecified counties as a first step toward creating a new division that would effectively grant bail.

Instead of relying on Maryland’s current system of multiple reviews by judges and commissioners, the newly created pretrial services commission would develop a system built on statistical analysis to identify flight risks or other reasons to lock someone up pending trial.

“It will start as a pilot and then it becomes a full-blown program in May of next year,” said Sen. Brian E. Frosh (D-Montgomery), the bill’s sponsor. “The tool does a better job of determining whether someone is likely to appear than a trained human.”

But critics said they were wary of removing from the judiciary the authority to make decisions affecting a person’s liberty and placing that power in the hands of an executive branch bureaucracy.

“This is the most radical proposition that I’ve seen in 16 years,” said Sen. Robert A. Zirkin (D-Baltimore County) said. “You’re handing over decisions of a person’s liberty to a political branch. There’s a reason no other state does that. . . This idea takes away that initial decision and hands it over to a computer.”

Zirkin said he believed the legislature should instead overturn the Court of Appeals’ decision that triggered the bill.

Frosh’s bill is intended to address court decisions holding that the state keeps too many people incarcerated for too long while pending trial and provides insufficient legal safeguards for them.

Those decisions, in DeWolfe v. Richmond, say all defendants are entitled to an attorney at the earliest proceedings, and that those who are too poor to afford a private attorney are entitled to a public defender — a right that the Office of the Public Defender estimates could cost taxpayers about $30 million a year. Frosh estimated that his proposal would cost about $16 million a year.