More than 20,000 drug convictions in Massachusetts will be tossed out after a lab chemist admitted she intentionally botched evidence for nearly a decade.

Annie Dookhan pleaded guilty to faking lab results and contaminating samples between 2003 to 2012, casting doubt on 40,000 cases she handled at the Hinton laboratory in Jamaica Plain, the Boston Globe reported.

Prosecutors said Tuesday they’ll throw out more than 20,000 of those convictions in a move that could be unprecedented.

“The dismissal of thousands of tainted drug lab cases rightly puts justice over results,” said Martin Healy, the Massachusetts Bar Association’s chief legal counsel. “It is a necessary and long-overdue outcome, given our criminal justice system’s responsibility to ensure a level playing field for all, regardless of the offense.”

The Massachusetts Supreme Judicial Court is expected to hand down an order of dismissal this week and affected defendants will be notified.

The American Civil Liberties Union, which fought for the dismissals, estimated about 320 cases handled by Dookhan remain.

“This was a mistake that comes from the war on drugs,” ACLU lawyer Carl Williams told NBC News.

Dookhan served three years in prison and was released last year.