The state's highest court ruled Wednesday that a shortage of defense lawyers caused by low pay is violating the constitutional rights of some poor defendants, and said cases must be dismissed against suspects who go without a lawyer for more than 45 days.

Ruling in a long-simmering dispute over the rate of pay for private lawyers who represent indigent people, the Supreme Judicial Court also ruled that criminal defendants cannot be held more than seven days in jail without a lawyer.

The ruling is expected to trigger the release on bail of at least 20 defendants in Hampden County. An undetermined number of additional defendants are also likely to have the charges against them dropped, at least temporarily, said William Leahy, chief counsel for the Committee for Public Counsel Services (search), an agency that provides lawyers for people who can't afford them.

In its unanimous decision, the court noted that the $30-per-hour pay for lawyers who represent indigent defendants in district court has barely changed over the last two decades and is among the lowest in the country.

"The continuation of what is now an unconstitutional state of affairs cannot be tolerated," Justice Francis X. Spina wrote for the court.

The ruling came in two lawsuits filed on behalf of poor defendants in Hampden County (search) by civil libertarians and the Committee for Public Counsel Services.

"This conclusively establishes that there is a constitutional violation of the right to counsel for criminal defendants in Hampden County, and the reason for that violation is the inadequate rate of compensation," Leahy said.

The court stopped short of ordering the state Legislature to raise the pay of the lawyers, as legislatures in some other states have done. But the court called the cases in other states "instructive" and urged the Legislature and the judicial branch to work together to resolve the problem quickly.

"We urge such cooperation in fashioning a permanent remedy for what can now fairly be seen as a systemic problem of constitutional dimension," the court said.

The court outlined a system for clerk-magistrates in Hampden County to prepare, on a weekly basis, a list of all unrepresented criminal defendants and said a prompt status hearing should be held for each defendant.

If at the time of the hearing, lawyers still cannot be found for the defendants, they must be released on bail if they have been held longer than seven days and their cases must be dismissed if they have not had a lawyer in more than 45 days, the court said.

The court said the charges would be dismissed "without prejudice" — meaning they could be filed again when a lawyer is provided.

But legal observers said that if the pay issue is not resolved quickly, the lawyer shortage will continue and the cases could be dismissed permanently.

The CPCS has about 110 staff lawyers — not nearly enough to handle the more than 200,000 cases involving indigent defendants each year. The agency relies heavily on private lawyers to represent poor defendants.

Lawyers from across the state have complained about the low rates, in some cases refusing to take any new cases until the pay dispute has been resolved.