BOSTON (AP) -- Justices of Massachusetts' highest court heard arguments Thursday on whether special magistrates who are trying to unburden trial courts of a flood of drug cases tainted by a state laboratory scandal may release convicts on bail before they're granted new trials.

Special "drug lab" court sessions began after authorities shut down Hinton state lab in Boston last summer following allegations that former chemist Annie Dookhan faked test results and tampered with evidence in narcotics cases.

Dookhan, 35, of Franklin, has pleaded guilty to perjury, obstruction of justice and other charges following a 27-count grand jury indictment stemming from cases in six counties. Authorities have said Dookhan tested more than 60,000 drug samples involving 34,000 defendants during her nine years at the lab.

Since then, dozens of defendants whose cases involved evidence Dookhan handled have been freed pending new trials.

But Essex County District Attorney Jonathan Blodgett is challenging whether the special magistrates, all retired Superior Court judges, may put sentences on hold and release drug convicts on bail before decisions on whether they'll get new trials.

Typically, a judge first decides whether a defendant should get a new trial and then considers whether that person should be free in the meantime.

Blodgett's office also is asking the high court to decide whether a special magistrate has the authority to reconsider a decision by a judge to deny a motion to put a sentence on hold and release a defendant on bail. And the district attorney wants the court to clarify whether a guilty plea by a so-called Dookhan defendant is valid if the process involves a judge and a special magistrate.

But lawyers from the American Civil Liberties Union of Massachusetts and the state's public defender agency, Committee for Public Counsel Services, argued that the thousands of defendants whose cases are caught up in the crisis deserve immediate relief.