In the six years that George Gascón has been San Francisco district attorney, he has brought 18 misconduct cases against local law enforcement officers. The charges have ranged from embezzlement to bank robbery to assault. But he has brought no criminal charges in the more than 40 San Francisco police shootings that have occurred on his watch, of which 19 have been fatal.

Gascón stuck to this pattern recently when he declined to file charges in the fatal 2015 police shooting of Amilcar Perez-Lopez, a 21-year-old Guatemalan immigrant who was shot six times by two plainclothes SFPD officers, with one bullet hitting the victim in the back of the head, four striking him in the back and one hitting him in the side.

There were a number of disturbing factors in the Perez-Lopez case, not least of which was the fusillade of bullets to his back. According to two witnesses who were the young construction worker’s roommates in a Folsom Street apartment near where he was gunned down, it was unclear whether Perez-Lopez was even aware that the plainclothes cops were police officers. He was involved in a heated dispute at the time with a man whom his roommates described as a neighborhood bully, and he was chasing his tormentor down the street with a knife when the police arrived.

Both Perez-Lopez and his antagonist, who was identified in Gascón’s report as “Abraham P.,” were inebriated. Did the slightly built Perez-Lopez think he was being surrounded by other bullies when he flailed wildly in the air with his knife at the street-clothes-wearing officers? Was he running away or still in hot pursuit of Abraham P., as the two police officers — Eric Reboli and Craig Tiffe — said they feared he might be? We’ll never know, because it was all over in a flash, with Perez-Lopez lying dead in the street.

Mission District activists alarmed by what they see as a siege of police violence and harassment aimed at the neighborhood’s Latino population — or what they call “gentrification by police brutality” — were outraged by Gascón’s decision to clear the officers in the Perez-Lopez case. “The D.A. made himself judge and jury by letting the cops walk, rather than let the community review the troubling inconsistencies and evidence in the case,” said the Rev. Richard Smith, who presided over funeral services for Perez-Lopez at his Episcopal church, Saint John the Evangelist.

“To me it absolutely screams cover-up,” civil rights attorney Ben Rosenfeld told Hoodline after Gascón released his report. “Mental gymnastics” is how Rosenfeld rightly characterized the report’s convoluted effort to explain how Perez-Lopez could have been viewed as a threat.

Public Defender Jeff Adachi echoed the criticisms from the community. “I thought the D.A.’s experts bent over backwards to justify the police officers’ decision to shoot at Perez-Lopez after he supposedly was retreating,” Adachi told me. “The D.A. essentially said that the standard (for prosecution) is too high, so we can’t make a case on any charge.”

But Gascón went to great effort to defend his decision to me. It was the first report produced by the new unit set up by the district attorney to investigate police shootings. And he has a lot riding on the credibility of his team’s work.

“Even though Perez-Lopez was shot in the back, it didn’t matter from a legal point of view,” Gascón told me, “because he was running toward Abraham, and the police have the right to use deadly force in defense of others as well as themselves. This case is about self-defense and the defense of others.”

Gascón concedes that there are problems with use-of-force laws in California and nationwide. “Just because the police can use deadly force under the law doesn’t mean they should.” But the Perez-Lopez case was not the one to pick for a court challenge of the law, he insisted, since it involved a knife-wielding man who a jury could reasonably decide was a threat to others. “The last thing you want to do is bring a bad case, because that can create bad law if you end up losing in court. You can makes things worse.”

UC Berkeley Law School Professor Franklin Zimring, author of the recent provocative book “When Police Kill,” believes that the most effective changes can be made not by state legislatures or district attorneys but by police chiefs and commissions — since they can change the “rules of engagement” that guide police conduct in the streets. He urges police departments to adopt a new set of deadly force rules, including forbidding police shootings when the adversary is brandishing only a knife and not a gun or is retreating from officers.

“A police chief’s priority shouldn’t be just the protection of his officers but the preservation of civilian lives,” Zimring said. “Of the 10 open police shooting cases recently listed in The Chronicle, at least five, and as many as eight, should not have been fatalities. If a shooting’s awful, it shouldn’t be lawful. If somebody hadn’t died in those cases, San Francisco would be a better city.

“The time when Gascón really could’ve done something to make a difference on this was his previous job as San Francisco police chief,” added Zimring, who recently participated in a forum on police shootings with the district attorney.

But Gascón can use his current platform to crusade for changes in deadly force rules at the local police department level as well as at the state legislative level, as he has done before on such issues as drug law reform and prison diversion programs. A Gascón aide told me that the district attorney’s appearance at the Berkeley forum with Zimring indicates his willingness to play this kind of advocacy role on de-escalating police violence.

Gascón made clear to me that his decision on the Perez-Lopez case doesn’t necessarily foreshadow his upcoming decisions on other police shootings that strike many observers (including me) as more egregious examples of police overkill.

Even Jeff Adachi is one of those hoping for the best. “You rightly pointed out in your Sunday column that George is a reform-oriented DA,” Adachi emailed me. “It’s hard for me to know what the injustice system looks like from his vantage point, but he has taken positions that most D.A.s would shy away from. I am hoping that he is able to pierce the iron shield that allows unaccountable police behavior. While he’s already rendered his decision in the Perez-Lopez case, he still has (fatal police shooting victims) Mario Woods, Luis Gongora-Pat and Jessica Williams to decide.”

San Francisco Chronicle columnist David Talbot appears Sundays, Tuesdays and Thursdays. Email: dtalbot@sfchronicle.com