Massachusetts is set to dismiss 21,587 drug cases tied to a disgraced state chemist who falsified evidence for years, according to the ACLU.

The American Civil Liberties Union of Massachusetts said it will be the largest dismissal of wrongful convictions as a result of one case in U.S. history.

In January, Massachusetts’ highest court had ordered district attorneys to produce lists by Tuesday of the roughly 24,000 cases connected to the chemist’s work that could be dismissed. The ACLU of Massachusetts went through the lists Tuesday night and found that 21,587 cases (almost all of them) had been recommended for dismissal. The formal court action could happen as early as Thursday.

The drug-lab chemist was Annie Dookhan, who pleaded guilty to 27 counts in 2013, including obstruction of justice, perjury, and tampering with evidence. Dookhan was such a prolific chemist that the thousands of drug cases tied to her became known as “Dookhan defendants.” Dookhan admitted that she declared drug samples positive that she didn’t even test, forged signatures, and embellished her credentials to embolden her reputation as an expert witness in court. She was sentenced to three to five years in prison and was granted parole last year, the New York Times reported.

There are 320 cases that will not be dismissed, and defendants will have the opportunity for retrial.