BOSTON — About 20,000 drug cases tied to a disgraced former state chemist appear headed for dismissal, lawyers for the American Civil Liberties Union and public defenders said Tuesday as they combed through legal filings from local prosecutors in Massachusetts.

“We’re all overjoyed today at having what is, we think, the largest dismissal of criminal cases as a result of one case in the history of the United States of America,” said Carl Williams, a lawyer with the A.C.L.U. of Massachusetts, which has pressed for the dismissal of tainted cases.

It was the latest development in the yearslong story of Annie Dookhan, a chemist whose co-workers called her Superwoman because she worked so fast. But she was found to have mishandled drug samples, forged signatures and returned positive results on drugs she never bothered to test, and in 2013, she pleaded guilty to 27 counts, including obstruction of justice, perjury and tampering with evidence.

By then, the damage was done. Prosecutors and defenders around the state had already begun the imposing task of figuring out which convictions had been tainted by the failings. Early estimates rose above 40,000. Hundreds of people were released from prison.

In January, the state’s highest court ordered district attorneys to produce the lists of people they believe they could reprosecute, were a new trial permitted, and those whose cases they will dismiss. Those decisions were due on Tuesday.

No final, official tally was immediately available, but on Tuesday afternoon, lawyers combed through spreadsheets inside an ornate courthouse here, painstakingly trying to determine the number of likely dismissals. On Tuesday afternoon, the A.C.L.U. officials estimated that prosecutors would not vacate the convictions of 500 to 700 people.

“From numbers that we’re initially getting, about 95 percent of these tainted drug convictions will be dismissed,” Mr. Williams said. “And that is a victory for regular people, for people who’ve been tarnished by these drug convictions.”

On Tuesday, lawyers for the A.C.L.U. and the Committee for Public Counsel Services, the agency that provides public defenders in Massachusetts, said the “Dookhan defendants,” as they are called, would receive mailings informing them of the status of their cases.

“In many respects, the damage has been done. Jobs have been lost, people have been unable to get jobs, housing has been lost, some people have been deported,” said Anthony J. Benedetti, the organization’s chief public counsel. “Justice delayed, justice denied,” he added.

In Suffolk County, which includes Boston, more than 7,800 cases were expected to be dismissed.

“These are not wrongful convictions,” said Jake Wark, a spokesman for the county’s district attorney, Daniel F. Conley. “They are cases that could be appealed on procedural grounds. Every case that was dismissed today was viable, it was based on admissible evidence that goes far beyond a drug certificate.”

Ms. Dookhan was sentenced to serve three to five years in prison and was granted parole last year. A message left for Nicholas A. Gordon, the lawyer who represented Ms. Dookhan in her legal case, was not immediately answered.

The scandal led drug labs around the country to re-examine their protocols, said Ronald S. Sullivan Jr., the director of the Criminal Justice Institute at Harvard Law School, which has some clients who are affected by the scandal.

Mr. Sullivan, who described the wave of dismissals as “wholly unprecedented,” said, “There will be literally tens of thousands of people whose lives will change.”