BOSTON – A Massachusetts drug lab was shut down Thursday after police discovered a chemist failed to follow testing protocols, potentially exposing thousands of convictions to legal challenges.

The lab was involved in certifying drug evidence in cases submitted by local police from around the state, including Boston. A state police spokesman said the chemist’s actions went beyond sloppiness into deliberate malfeasance.

Gov. Deval Patrick said he instructed state police to close Hinton State Laboratory Institute. He called the chemist’s alleged violations “deeply troubling.”

“No breach this serious can or will be tolerated,” Patrick said in a statement. “The state police will continue their investigation to determine what happened and who is responsible so that we can hold those accountable.”

In June, state police were informed about inconsistencies in the chemist’s work at the lab, which was then run by the Massachusetts Department of Public Health.

When state police took over operation of the lab in July as part of a budgetary directive, they began their own audit.

Within the last few days, state police realized the “large scope” of the chemist’s inconsistencies and decided to close the lab, said state police spokesman David Procopio.

Procopio said it is unclear how many drug cases may have been mishandled by the chemist, but he said she performed thousands of tests since she began working at the lab in 2003, either as the primary chemist or as a secondary chemist.

He said there is evidence that the chemist, who resigned in March during the Public Health Department’s internal investigation, not only failed to follow proper protocols, but in some cases deliberately mishandled drug evidence.

“This is more than just allegations of sloppiness and cutting corners,” Procopio said. “The allegations include malfeasance, deliberate mishandling.”

Procopio would not say if police believe she purposely changed the results of drug tests to help police win drug convictions.

Chemists at the lab perform drug certifications for local police departments, which then give the results to prosecutors.

For example, if someone is arrested for having a white powdery substance, a chemist tests the substance, then certifies that it is cocaine and certifies its quantity so that prosecutors can use it as evidence in a criminal case.

Police would not name the chemist, and she is not charged with a crime. Procopio said state Attorney General Martha Coakley’s office is conducting a criminal investigation.

“We are concerned that in some of the cases, there’s a likelihood that justice was not served, that a defendant did not get a fair trial and that it’s possible that people may be incarcerated unjustly,” he said.

Ten other chemists who worked at the lab were placed on administrative leave and will eventually be sent to work at another of the nine state police labs. Procopio said those chemists are not suspected of any wrongdoing.

Larry Tipton, who heads the Norfolk Superior Court office of the Committee for Public Counsel Services, said public defenders in his office began hearing about problems at the lab months ago.

He said one public defender in his office received a letter in February from an assistant district attorney who said a chemist was being investigated for a “possible breach of protocol” with respect to some drug samples.

The prosecutor identified the chemist as Annie Dookhan.

Dookhan could not immediately be reached for comment. She appeared to have a nonpublished telephone number.

WHDH television station in Boston reported that the woman’s husband said in a statement that “my wife maintains her innocence … more than one person was involved in botching a drug procedure. We believe it’s co-workers who are trying to create a scapegoat.” The station does not name the husband.

Brad Puffer, a spokesman for Coakley, said state police informed the attorney general’s office in July about allegations regarding the possible improper handling of drug evidence. Puffer said Coakley’s office has interviewed dozens of people and developed evidence that certain required procedures were not followed.

Reaction from defense attorneys was swift. Several said they will challenge the results of any drug certification performed by the chemist.

“It’s going to throw the system into some confusion for a while,” said John LaChance, a Framingham defense attorney.