A chemist at a Massachusetts drug lab accused of faking test results in criminal cases has pleaded guilty to obstruction of justice, perjury and tampering with evidence.

Annie Dookhan, of Franklin, entered guilty pleas Friday in Suffolk Superior Court.

Dookhan sent the state's criminal justice system into a tailspin last year when state police shut down the state Department of Public Health lab she worked at after discovering the extent of her misconduct.

Prosecutors said Dookhan admitted "dry labbing," or testing only a fraction of a batch of samples, then listing them all as positive for illegal drugs. They said she did it to "improve her productivity and burnish her reputation."

Since the lab closed in August 2012, at least 1,100 criminal cases have been dismissed or not prosecuted because of tainted evidence or other fallout from the lab's shutdown.

Prosecutors from state Attorney General Martha Coakley's office recommended a sentence of up to seven years in prison, while Dookhan's lawyer recommended a sentence of no more than a year.

Judge Carol Ball said in a written memo that she would impose a sentence of no more than three to five years if Dookhan decided to change her plea to guilty.

Dookhan's lawyer, Nicolas Gordon, argued that she made a series of tragic mistakes and that her only motivation was to be "the hardest-working and most prolific and most productive chemist."

"This is not a woman who ever set out to hurt anyone," Gordon argued during a court hearing last month.

Prosecutors, however, said Dookhan's actions had caused "egregious damage" to the criminal justice system and cost the state millions of dollars to assess the damage and mitigate the effect on thousands of people charged with drug offenses during the nine years Dookhan worked at the lab. The court system has been flooded with motions for new trials filed by defendants in drug cases.