The 2012 state drug lab scandal in Massachusetts is coming to a close with the dismissal of some 20,000 criminal cases because they were based on evidence potentially tainted by former state chemist Annie Dookhan.

National forensic experts are calling that number of dismissals "staggering."

Tuesday was the court-imposed deadline for Massachusetts' seven district attorneys to submit lists of cases from their offices to be dismissed and cases they believe would hold up regardless of Dookhan's drug tests. In total, they had identified a total of 24,000 cases that used Dookhan drug tests.

A few hundred of those cases could be reprosecuted. Officials don't believe anyone is still incarcerated in a case based on the faulty tests tied to Dookhan.

Fight Over Case Dismissals

The deadline was the result of a January state Supreme Judicial Court ruling in one of the several legal challenges brought by defense attorneys.

"Five years and millions of dollars have been spent, countless staff hours," said Anthony Benedetti, chief counsel of the Committee for Public Counsel Services (CPCS), the state's public defender agency. "But we're here today because of the insistence and hard work of attorneys who would not give up, and quite frankly, would not accept what was being sold as a much smaller crisis."

When officials were first notified of a problem at the now-closed Hinton drug lab, they said it involved a single incident of bad testing. After state police took over the lab from the Department of Public Health, Dookhan admitted to falsifying thousands of drug tests and went to prison for three years.

To deal with the problem, the state set up special court sessions, hired special investigators and said hundreds of people were released from prison. But prosecutors refused requests to dismiss all of the cases involved.

"Each time the DAs fought us tooth and nail," said Benjamin Keehn with CPCS. "The question is, I think, why are we as a Commonwealth addicted to the criminalization of drug addiction?"

Prosecutors dispute that, saying the reason it has taken several court fights to get to this point is because defense attorneys were not willing to compromise.

"They just wanted to push and push and push until they could get every case dismissed, and the SJC did not buy into that," said Cape and Islands District Attorney Michael O'Keefe.

The list submitted Tuesday shows O'Keefe's office will dismiss about 1,000 cases — half of which he says are minor. O'Keefe will keep only one case for possible reprosecution.

"We should keep in mind that we're not dealing with actual innocence here," O'Keefe said. "We're dealing with drug defendants — the overwhelming majority of whom pled guilty. We believe that the integrity of our system of justice is more important than an individual conviction."

The largest number of dismissed cases is in Suffolk County, which says it will dismiss about 15,000 cases. Suffolk District Attorney Dan Conley said in a statement that his office is prepared to reprosecute 117 convictions. Conley's statement also said many of the dismissals involved people with significant criminal histories and convictions based on more than Dookhan's drug tests alone.

Database Of Dismissals

Defense attorneys are now making a centralized database of each of the DAs' lists, and they've set up a hotline people can call to see if their case is dismissed. (That hotline number is 888-999-2881). Many defendants are eager to learn if their case is dismissed.

"I'm definitely going to get in touch with an attorney, and I'm going to definitely look into it because I know something's there. I know there is," said 30-year-old Angel — who did not want his last name used in case his charge is dismissed. He says Dookhan tested the drug evidence in his case, which resulted in a three-year prison sentence for drug distribution that he completed in 2013. Angel says that felony drug conviction has affected him in ways beyond prison.

"Getting a job or housing. There is no way I can apply for Section 8 or any type of housing without them shooting me down because of my criminal history," he said.

The consequences to the state's criminal justice system are significant.

"It's clearly stunning," said Suzanne Bell, a professor at West Virginia University, who served on the National Commission on Forensic Science. She says the commission reviewed the Dookhan case, as well as other states' scandals while looking at how to improve forensic testing.

"The number of cases is mind boggling, and the consequences will be far-reaching," she said. "It certainly shows the importance of accreditation of laboratories."

The National Commission on Forensic Science was set up three years ago to bring law enforcement and scientists together to work on forensic testing issues. But the Department of Justice dissolved the commission last week.

Retired Supreme Court Justice Margot Botsford admits this is a mark on the system. But Botsford, who has been working with both sides on this process, hopes that this way of dealing with affected cases strikes a balance.

"The court is trying to achieve a remedy that reflects the seriousness of the stain on the criminal justice system and would give relief to those who were subjected to it, but also to reflect that actually, the criminal justice system — large pieces of it — work fine and it is a good system."

The cases are expected to be formally dismissed this week.

Massachusetts drug testing labs are now accredited and run by state police, but there are calls for a state agency, independent of law enforcement, to oversee the labs. Supporters of that point to a second drug lab scandal in western Massachusetts, where thousands more drug cases might be compromised.