BOSTON — Massachusetts prosecutors said Thursday that they will dismiss more than 6,000 convictions tied to a former chemist who authorities say was high almost every day she worked at a state drug lab for eight years.

The move comes months after the American Civil Liberties Union and the state's public defender agency asked the state's highest court to throw out all of the cases tainted by Sonja Farak, who pleaded guilty in 2014 to stealing drugs from a state crime lab at the University of Massachusetts Amherst and tampering with evidence.

"Dismissal vindicates the rights of our clients to due process and fair prosecution and restores the integrity to the justice system by sending a clear message to prosecutors that no conviction will be allowed to stand in the face of such fraud," said Randy Gioia of the Center for Public Counsel Services.

The total number of Farak's cases that will be dismissed could grow as several other prosecutors haven't yet provided numbers to the Supreme Judicial Court. Most of them are low-level drug cases and officials say they're not aware of anyone who's still behind bars as a result of a tainted conviction. But convictions can impact a person's ability to get housing, loans and other things.

The Hampden District Attorney's office said it would dismiss about 3,940 district and juvenile convictions involving drug samples tied to Farak. The Northwestern district attorney has agreed to throw out 1,497 convictions, saying it would not be in the "best interests of justice" to re-try the cases, even though they don't believe anyone was wrongfully convicted.

"The egregious misconduct committed by one rogue chemist at the Amherst Lab shook the very foundation of our criminal justice system, the integrity of which must be preserved at all costs," District Attorney David Sullivan said in a statement.

A trial judge, who earlier this year threw out the convictions of several defendants whose cases were handled by Farak, found that two former assistant attorneys general mislead the court and "tampered with the fair administration of justice" by withholding evidence about the scope of the chemist's misconduct.

Attorneys say prosecutors also failed to notify the people whose cases were tainted by Farak until they brought the matter to the state's highest court.

Carol Rose, executive director of the ACLU of Massachusetts, said prosecutors and others in the criminal justice system must take steps to ensure something like this never happens again.