Maryland’s highest court issued a ruling earlier this year: Poor people need attorneys before being booked into jail.

The response from state lawmakers: Don’t send so many people to jail in the first place.

Under legislation scheduled for votes Thursday, people would be less likely to be hauled directly to jail for smoking marijuana, shoplifting, destroying property or committing one of a series of other misdemeanors. The matters would be handled with citations, with an expectation that the suspect would later show up for court.

“We wanted to look at the situation holistically,” said Senate Judiciary Committee Chairman Brian E. Frosh (D-Montgomery), one of the lead authors of the legislation. “There are 170,000 to 180,000 people each year who are arrested in Maryland and not all of them necessarily need to be incarcerated.”

What’s more “if you can reduce that number, you can reduce the stress on the system, reduce the number of judges, public defenders, state’s attorneys and so forth that’s needed,” Frosh said.

But the legislation has been fast-moving and fast-changing, leading to growing concern among police and prosecutors about what will become final law. Officers on the streets need to be able to lock up certain misdemeanor offenders, or at least take them through the fingerprinting and booking process long enough to know exactly who they are dealing with, said Michael Pri­stoop, the Annapolis police chief, who serves on the legislative committee of the Maryland Chiefs of Police Association.

He understands the need to makes changes to save money, he said, “but wouldn’t want to be bound by citations.”

“I have been cautioning lawmakers about unintended consequences,” said Kristen Mahoney, a former high-ranking Baltimore police officer who leads Gov. Martin O’Malley’s (D) office of Crime Control and Prevention.

The legislation stems from a Jan. 4 Maryland Court of Appeals opinion that dealt with procedures that kick into place after someone is arrested. The suspect is brought before a “court commissioner,” an official who often works in the gritty booking area of county jails. Commissioners decide whether to release the suspect pending trial, assign a bail amount that must be posted before release or — in serious crime cases — order the suspect held without bail.

The high court ruled that people who are arrested are entitled to have lawyers when they appear before commissioners. Maryland’s public defenders said it would cost at least $23 million annually to provide lawyers at the hearings, which run round-the-clock. Given that prosecutors would attend, the price tag doubled, and that was without factoring other costs including additional security, officials said.

Lawmakers initially proposed what seemed to be a fairly simple and less expensive alternative: requiring lawyers to be at the suspect’s “bail review” — a follow-up hearing before a judge that generally takes place the next weekday after the arrest. These hearings wouldn’t require round-the-clock staffing.

An initial bill altered only two sentences of the state code, then all the add-ons started coming. Since late last week, measures moving through the House of Delegates and state Senate have been amended more than seven times.

“It literally has been changing every day,” said John McCarthy, Montgomery County’s lead prosecutor. “It didn’t have to be this complicated.”

The legislation appeared to be a moving target, even as of Wednesday. Under one version of the House bill, police officers would be given discretion to issue citations for seemingly any non-violent misdemeanors. A Senate version was in some ways more restrictive, saying that police officers had to issue citations for many misdemeanors, but carving out exceptions for particular crimes: violation of a restraining order in a domestic violence case, for example.

Another issue is giving police officers time to determine whether someone is being truthful about his or her identity. One proposal would allow an officer to take someone into custody, perform fingerprinting, then issue a citation. Officers could be given the discretion to hold someone they perceive as a public-safety risk.

Some critics question whether the law would be applied equally. One amendment would require the state to track how citations are issued across racial and ethnic lines.

Others say the process has simply moved to fast.

“This needs to slow down,” said House Minority Leader Anthony J. O’Donnell (R-Calvert), who on Wednesday was able to delay a final vote on the measure in that chamber to Thursday. “I have a big concern that this is going to open the floodgates for people walking for very serious, serious crimes.”

But Frosh, the Senate Judiciary chairman, said the intent is to reduce to the number of people locked up who don’t need to be.

“This is not compromising public safety in any way,” Frosh said.