San Francisco officials Tuesday ordered the shutdown of all drug testing at the police crime lab amid allegations that a former technician stole and used some of the cocaine she was supposed to analyze.

Deborah J. Madden, 60, of San Mateo officially retired this month. An investigation linked her to missing drugs in at least six cases in the latter part of 2009, police said.

She left her job as of Dec. 8 and has recently been in treatment for drugs and alcohol and other unspecified health issues, police said.

Officials discovered that the evidence was missing during a crime lab audit conducted in December, police said. That review was triggered when other technicians suspected someone had been stealing evidence and a supervisor noticed apparent tampering with the packaging of drug evidence, San Francisco Police Chief George Gascón said at a news conference Tuesday evening.

"We're being very, very cautious here," Gascón said, calling the matter "disappointing" but stressing that the department is going out of its way to be transparent and to make sure any improprieties are limited to the one former employee.

"It puts the hard work of every other employee of the crime lab into question," the chief said, adding that the department will bring in outside agencies to do a thorough review of the drug-testing section of the crime lab, which had two technicians at the time Madden worked there. She was the supervising criminalist over the testing.

Gascón said that when interviewed as part of the investigation, she had leveled charges of her own about the lack of control over drug evidence. One official said Madden called the drug-testing process at the lab "sloppy."

In her job, Madden was supposed to vouch for the weight and purity of seized drugs but instead used the cocaine, authorities say.

While only the six cases have been discovered where she allegedly skimmed the drugs, the investigation is continuing.

When The Chronicle reached her at home, Madden declined to comment.

"I don't know anything about it," she said.

San Francisco District Attorney Kamala Harris could not say how many cases might ultimately be jeopardized by the thefts, but said that at least 20 drug cases could be dismissed immediately as a result of the shutdown of the crime lab's drug section. The evidence in the cases will be retested by either the federal Drug Enforcement Administration or labs in Alameda or San Mateo counties, which would do the testing on San Francisco's behalf.

"We need to regroup and re-evaluate" drug testing by the Police Department, Harris said. The lab handles as many as 50 drug cases a day.

Police officials said that while the amounts stolen were small, they were in each instance measurable, and involved cases in which suspects were arrested for selling cocaine. It is unclear what will happen with those six cases, but in some of them Madden might have been summoned to testify and therefore could have perjured herself about the evidence.

Madden had been working as a criminalist for the city for 29 years and earned $122,000 last year in salary and overtime. She is free on $40,000 bail in San Mateo County, where she was arrested March 3 on weapons charges as a result of a search of her home.

San Francisco and San Mateo County officers searched her home last month and found a gun, which she is barred from having because of a domestic violence case, and a small amount of cocaine.

Steve Wagstaffe, chief deputy district attorney in San Mateo County, said Madden was not supposed to possess a weapon as she had been convicted by a jury in 2008 in a misdemeanor domestic violence case lodged the year before.

She is due back in court April 5 on the weapons case.

Also on Tuesday, police released an audit by the American Society of Crime Laboratory Directors that shows the San Francisco lab does not have a secure chain of custody for evidence, fails to keep detailed case records and does not meet standards of cleanliness. The audit found that the lab is routinely underfunded and understaffed and has to rely on overtime to fulfill its mission.