A lawsuit that sought to end the practice of holding defendants in the Cook County jail for lack of cash to post bond was thrown out last week by a Cook County judge.

Chancery Court Judge Celia Gamrath dismissed the case on June 26, ruling narrowly on technical aspects of the suit rather than on the broad, constitutional claim made by the plaintiffs: that setting bond amounts higher than defendants can afford to pay discriminates against the poor — and predominantly minority — defendants who must stay locked up because they don’t have money.

Advocates who brought the suit last fall on behalf of a pair of Cook County defendants who spent months in jail on theft charges because they couldn’t post bond amounts of $1,000 and $5,000 respectively, said they intended to appeal the ruling.

The lawsuit noted that the state constitution stipulates defendants are to go free ahead of trial unless they pose a threat to the community or are likely to flee. Public safety, not money in the bank, should determine who is jailed while their case is pending, said Matthew Piers, an attorney working on the case with the MacArthur Justice Center.

“If you give someone who is indigent a $50,000 bond, you might as well put a 10,000-pound weight in the courtroom and say, ‘As soon as you can lift that 10,000-pound weight, you can go,’ ” Piers said. “That’s impossible, and no one would say that’s fair, but that’s essentially how the system works.”

The suit sought a court ruling that would have required judges to set bond amounts defendants could pay. At the time it was filed, about 300 defendants were jailed who could have bonded out for $1,000 or less.

Since then, Chief Judge Timothy Evans replaced the six judges who handle the bulk of bond hearings and mandated them to set affordable bail amounts. The courts also have ramped up their pre-trial services, assigning numerical scores for each defendant based on their likelihood of committing new crimes if freed on bond, and their probability of missing future court dates.

The number of inmates in jail dropped by 1,300 in a matter of months after Evans’ order took effect, but attorney Alexa Van Brunt of the MacArthur Justice Center said data shows many defendants still are locked up for lack of bond money, with wide variation in the bonds set by different judges for similar charges.