But, as they say, fortune favors the bold, so on Wednesday, the department announced that it had caught 212 suspects in a 21-day drug sweep that ended Sunday.

For the last two weeks of the operation, police basically had to book people and let them go, because prosecutors have filed almost no new cases since March 9. Only a handful of additional pending cases have been salvaged in recent days, since police officers started doing basic drug testing on their own.

That fact got scant attention in a police press release that boasted of undercover buys of heroin, crack cocaine, methamphetamine and other drugs in the Mission and Tenderloin, areas where open-air sales have long prompted neighborhood complaints.

The department said 31 percent of those arrested came from outside San Francisco and 35 percent were on parole or probation.

“Day-to-day narcotics enforcement remains a top priority for the Police Department,” the release said.

Brian Buckelew, a spokesman for District Attorney Kamala Harris, says prosecutors have been forced to drop about 300 cases since suspicions became public about whether a now-retired technician at the police crime lab, Deborah Madden, was skimming cocaine.

Police said some of the cases stemming from their three-week campaign were prosecuted immediately, while the drugs from others “were sent to various crime labs for analysis for later prosecution.”

It promised that the DA’s office will obtain arrest warrants in the remaining cases “pending narcotics lab analysis.”

Buckelew said only seven new narcotics cases have been filed since the scandal broke. “Those are the only ones the Police Department has tested,” he said.