On March 24, 2011, a veteran San Francisco Police Department officer sat down at an undisclosed location in the city with a 40-year-old career criminal named Jorge Luis Sandoval. Sandoval wasn’t under arrest, even though at the time he had felony charges pending in San Francisco, Contra Costa, and Monterey counties that could have returned him to prison for life. Sandoval wasn’t under arrest because he was helping out; he was a confidential informant.

This unstable relationship is typical: Informants are essential law enforcement sources for intelligence about criminal activity, but many of the most valuable informants are career criminals themselves. Sandoval fit that bill. A two-strike felon with a rap sheet stretching back to the 1980s, he rose through the ranks of the notorious prison gang Nuestra Familia to become the leader of its San Francisco “street regiment.”

As Sandoval and the officer made to leave, they were confronted by a team of U.S. Marshals and FBI agents from Stockton. Unbeknownst to the Familiano or his SFPD contact, the feds had an arrest warrant from the Eastern District of California for Sandoval’s role in a massive methamphetamine trafficking ring based out of Nuestra Familia’s Salinas heartland — part of a sprawling, multi-year federal operation called Operation Valley Star aimed at dismantling the prison gang. SFPD had no knowledge of this operation, according to sources at the office of the U.S. Attorney for Eastern California. But SFPD had known for years about Sandoval’s drug trafficking activities, and did nothing about it.

There was confusion all around. Because what the feds didn’t know as they put Sandoval into cuffs and watched the confused SFPD officer walk out of the room was that Sandoval had been providing information to the police since at least since 2010, when he gave up his stepson Tomas Gutierrez for a 2007 shooting in Potrero Hill which left a woman dead and two men wounded. Sandoval wasn’t just playing the Good Samaritan here: Court records reveal Sandoval provided his stepson with the .40-caliber pistol used in the robbery-turned-murder — and that Gutierrez and two others committed the robbery to repay a methamphetamine debt owed to Sandoval.

In Sacramento, U.S. Magistrate Judge Gregory G. Hollows ordered Sandoval held without bail. In the detention order, Hollows made several notes explaining his rationale to keep Sandoval in custody; most damningly, that “no condition excuses the safety of the community because of his demonstrated criminal record.”

SFPD and the federal authorities in Sacramento had very different ideas about acceptable conduct for the Familiano. Sandoval’s case illustrates the thornier problems involved in using confidential informants.

“CI’s are a necessary evil,” says Chuck Drago, a Florida private investigator who spent more than three decades in law enforcement. An exchange of information for leniency between criminals and police is part and parcel of law enforcement work. But when does this give-and-take go too far? And who decides that? Sandoval’s extensive criminal record and history of violent and drug-related crimes did not escape the notice of federal authorities in Sacramento; even within SFPD there were some who noticed this dangerous oversight.

Three years and a day before he was arrested by the feds, Sandoval and an associate were pulled over and found in possession of large amounts of cocaine, crack, and methamphetamine. A scale and .40 caliber ammunition (the same caliber as the bullets that killed Liri Lesku in the robbery a month earlier) were found at Sandoval’s Pacifica home, prompting SFPD narcotics Inspector Martin Halloran to request that Sandoval be held without bail, because he was in all likelihood “a major street narcotics trafficker in San Francisco and possibly the East Bay.”

Yet San Francisco authorities declined to prosecute Sandoval for the 2008 drug charge — or for a 2006 arrest for weapons and drug possession, or for a 2007 multi-agency bust in Richmond where Sandoval was packaging almost 9 ounces of cocaine for sale. All three arrests could have sent Sandoval away for life. But nothing happened. Sandoval remained free to keep committing crimes.

The federal case against Sandoval proved Halloran’s suspicions, and then some: Sandoval was an integral part of Nuestra Familia’s drug trafficking operation — ferrying cocaine, methamphetamine, and cash between the Bay and Salinas.

The leniency shown toward him in San Francisco and Contra Costa County astonished a senior member of the Public Defender’s felony unit. “There’s no way that sort of charge drags on for five years,” the attorney says on condition of anonymity. “Not for that weight and that many offenses — it’s an open and shut case almost.” Sandoval’s high-level involvement with Nuestra Familia’s crimes and drug trafficking posed such a threat that federal authorities from Sacramento indicted him, something the San Francisco-based U.S. Attorney for Northern California failed to do.

The lack of oversight for SFPD’s use of confidential informants, the police department’s refusal to act, and the recognition by other authorities that these CI’s were out of control point to a culture of impunity within certain branches of San Francisco law enforcement that cries out for scrutiny and reform, experts say.

Peter Keane is one of these. “When you get in bed with characters like these and give them a pass on crimes they’re committing, it’s a form of corruption,” says Keane, dean emeritus and professor of law at Golden Gate University, and a former San Francisco public defender and police commissioner. So how did local law enforcement in San Francisco let this situation get so out of control?

Informants going rogue is a long-standing problem for law enforcement. A 2004 congressional report on the culpability of the Massachusetts FBI and U.S. Attorney in allowing Boston gangsters Whitey Bulger — the inspiration for Jack Nicholson’s character in The Departed — and Stephen Flemmi to commit more than a dozen murders while cooperating with the feds found that: “Democracy succeeds in the United States when the rule of law is respected. When the government strays from the rule of law, the harm outweighs the benefit.” Bulger and Flemmi’s crimes, the report stated, “happened because informants were being protected and some members of the FBI adopted an ‘ends justifies the means’ approach to law enforcement.”

In San Francisco, a 2011 federal case against MS-13 in the Mission District was tarnished by the violent activities of the government’s key informant, who continued to order and commit assaults while cooperating. The government’s key informant in Operation Black Widow, another federal investigation into Nuestra Familia conducted during the late ’90s and early ’00s, committed and ordered assaults and at least one murder while cooperating with the FBI. Federal prosecutors looked the other way.

While informants have been a staple of information-gathering, former Florida cop Drago, who supervised organized crime and narcotics units, says that most informants are usually low-level offenders who are shown leniency for petty crimes in exchange for reporting on more serious criminals. Police regulate the conduct of informants through internal guidelines, which generally prohibit officers from using individuals involved in serious crimes such as murder, rape, and drug trafficking.

According to SFPD’s own Informant Manual, officers are supposed to cut loose confidential informants if they engage in violent activity: “Individuals with serious crimes of violence, sexual misconduct (other than prostitution), weapons violations and/or perjury convictions should not be considered as potential informants.” Such people can only be used with the approval of the unit’s officer-in-charge, the commanding officer of the Investigations Bureau, and a member of the District Attorney’s Office.

Drago says that although guidelines for acceptable conduct are “stretched” in police departments, going so far as to turn a blind eye to violent offenses like Sandoval’s crimes crosses the line.

“No informant is that good that a police department should compromise themselves where a dangerous criminal goes around committing these crimes,” says Drago. Aside from being dangerous, he believes that CI’s like Sandoval aren’t reliable because, by continuing to commit crimes, they violate their agreement with the police.

“These cases tell you that, at a minimum, SFPD has become very irresponsible,” says Keane. Rather than the informant being beholden to the police for allowing him to stay on the street in exchange for keeping them in the know, Keane says that when authorities turn a blind eye to serious crimes, it “gives the criminal a view of himself that he’s untouchable — and he is.”

Drago and Keane both believe that the existence of rogue informants for SFPD’s specialized Gang Task Force and Narcotics Bureau indicates serious flaws in the department’s internal checks and balances. (The SFPD’s Narcotics Bureau, Gang Task Force, and Media Relations Office wouldn’t comment on the department’s handling of violent informants for this story.) “Somebody is dropping the ball in management,” says Drago. “SFPD have let loose an unguided missile on the public” by allowing dangerous men like Sandoval (and, as we’ll see, at least one other) to stay at large in spite of their offenses, says Keane. “No modern police force with any professionalism engages in that sort of practice anymore.”

Sandoval rose quickly in Nuestra Familia’s ranks after he was discharged from state prison in May 2005, serving nine years for first-degree robbery. Once outside, Sandoval played a critical role in N.F.’s drug trafficking operation, moving cash, cocaine, and dozens of pounds of methamphetamine between Salinas, the Bay Area, and elsewhere. He soon took over cocaine trafficking for N.F.’s Salinas regiment, and also rose to become the head of the San Francisco regiment.

According to the testimony of N.F. “associate” Jason Treas, Sandoval and several other high-ranking Familianos would hold regular “juntas” about their drug operations, robberies, and “whatever criminal activities that we could be involved in that would financially benefit the regiments.” The mid-2000s were fat years for N.F.: At its peak, the San Francisco regiment took in roughly $500,000 per month and $150,000 in profit after paying tribute to Salinas. N.F. had a direct line to the Jalisco cartel for methamphetamine. Drops were often made at Metro PCS franchises, which N.F. favored as a means for laundering money.

Though Sandoval was on parole, he made no attempt to stay out of trouble. On Feb. 10, 2006, he was arrested in Salinas by the local gang task force after trying to evade cops first in a van, then on foot. Police saw Sandoval toss a pair of gloves from the passenger side of the van, and a loaded .38-caliber revolver with a spent casing was found in the van’s passenger door. Sandoval was charged with firearms offenses by the Monterey County District Attorney, but made bail twice. His bench warrants are still open. Less than four months later, in May, SFPD arrested and charged Sandoval with a DUI and possession of a loaded gun. Sandoval bailed out on this case as well, and moved to Richmond with Treas.

But a new city didn’t mean a new start: On Feb. 27, 2007, the Richmond Police Department, SFPD, and Drug Enforcement Administration agents raided the apartment complex where Treas and Sandoval lived. Richmond Police Sgt. Aaron Pomeroy’s police report notes that SFPD narcotics Inspector Britt Elmore wrote the search warrants; Elmore would help Sandoval negotiate his cooperation with SFPD years later.

Five SFPD officers and two from Richmond broke in the door to Sandoval’s apartment at 2601 Hilltop Drive, while 17 other officers burst into nearby apartments where Treas and a woman were living. Sandoval and his girlfriend were also detained. Pomeroy searched Treas’ apartment and garage, turning up a digital scale, 27.8 grams of methamphetamine, cocaine, and 9 mm ammunition. The apartment had been set up as a drug mill. Sandoval took responsibility for the drugs and was booked for alleged possession of cocaine with intent to sell.

Sitting in his office at the Richmond Police Station that afternoon, Pomeroy got a shock when he glanced out the window and saw Sandoval walking away from the building. After checking with the Richmond City Jail and realizing Sandoval had made bail, Pomeroy had Treas’ bail raised. The Contra Costa DA’s office filed charges against Sandoval, which, had he been convicted, would have been his third strike. But the DA’s office sent the case back to law enforcement for “further investigation,” and charges were never pursued. Luis Marin, the supervisor of the Contra Costa County DA’s drug unit, says he returned Sandoval’s arrest to Richmond police because the bench warrant was issued by a San Francisco judge, but SFPD never provided information that would have allowed the Contra Costa DA to charge the case. “We only know what they tell us,” says Marin. “There was … something needed for prosecution that we didn’t have at the time.”

Three open cases in three different Northern California counties didn’t scare Sandoval straight. More perplexing is that the three cases should have led to incarceration. Defense attorneys contacted for this story remark that Sandoval’s cases in San Francisco, Salinas, and Contra Costa were enough to secure a long prison sentence, and that such delays in assault and narcotics trafficking cases are atypical. Yet again and again, he was allowed to return to the streets.

Meanwhile, the feds in Sacramento were preparing the case that would ultimately lead to his arrest.

While it is unclear exactly when Sandoval started cooperating, a Feb. 2, 2010, meeting between Sandoval, his attorney, and three SFPD inspectors makes it abundantly clear that authorities knew the severity of Sandoval’s crimes and defied their own guidelines by working with him. Narcotics Inspector Britt Elmore — who was present at his 2007 arrest in Richmond — led the interview, in which Sandoval received immunity from any charges relating to his testimony identifying the killers of Liri Lesku, a 34-year-old meth addict who was murdered during a robbery gone bad on Feb. 13, 2008.

Sandoval told the SFPD inspectors that his stepson and one of Sandoval’s crank dealers planned to rob another dealer because both owed Sandoval money.

The dealer, Sierra Kazarian, tried to convince Sandoval to go in with her on the heist. He was hesitant, but also wanted his money: “So I told her, ‘If you’re going to go do it … make sure you pay me my money that you owe me,'” Sandoval told the cops. The trio met at the house of his stepson, Tomas Gutierrez, where Sandoval admitted he kept up to a pound of meth and a .38-caliber pistol. In advance of the robbbery, other pistols traded hands between Gutierrez and Sandoval — a small-caliber Beretta pistol and a .40-caliber Smith & Wesson pistol. Gutierrez agreed to participate after Sandoval helped them plan out the robbery.

The plan was for an accomplice to buy some crank, and Kazarian and Gutierrez would come through the open door. Sandoval drove to Potrero Hill behind a van Kazarian had stolen for the occasion, and waited. A short time later, Kazarian called him, swearing frantically. After Gutierrez and Kazarian jumped in the van, Kazarian said, “Man, he just let off the whole clip.'”

They drove back to Sandoval’s Pacifica home where he told them to dump their clothes. Kazarian hid the gun in the bushes.

Medical records say Lesku died from a single .40-caliber bullet wound to the head — the same caliber of ammunition found in Sandoval’s house a month later. Two men who were also in the apartment survived the shooting. Gutierrez told Sandoval that one of the men had tried to jump him. “I just popped ’em,” Gutierrez said. “I just popped everyone and ran out.”

Gutierrez gave the .40-caliber pistol back to Sandoval, who sold it a few weeks later — another unpunished crime.

Despite Sandoval’s admission that he provided the murder weapon and that the robbery was for his benefit, SFPD reassured him that he was in the clear. “This is nothing on you, Mr. Sandoval,” Inspector Elmore said.

(Melinda Haag and Benjamin Wagner, the United States’ Attorneys for Northern and Eastern California, respectively, would not comment on Sandoval’s case.)

While Sandoval’s participation in N.F.’s drug trafficking is not documented past 2007, in his 2010 interview with SFPD, Sandoval admits to dealing meth and other drugs. But SFPD had the opportunity to rein him in before Lesku’s murder, notably when he was arrested in Richmond in 2007 — either the trafficking charges or the open bench warrant for assault in Monterey County could have put him away. Instead, Sandoval remained at large, with the complicity of SFPD.

And Jorge Sandoval is not alone.

Court documents and testimony reveal that SFPD and the District Attorney’s office under current California Attorney General Kamala Harris protected another, unrelated, high-ranking gang-member-turned-informant from repercussions for criminal activity including drug trafficking, fraud, extortion, and weapons possession to assault and murder. Abraham H. Guerra Sr., a Norteno lieutenant and career criminal who beat an attempted murder charge because the shooting victim was too frightened to testify against him, also was shielded by San Francisco law enforcement from going back to prison again and again, despite repeated attempts by his parole officer.

SFPD denied a Public Records Act request for the department’s files on Guerra. The department also refused requests for comment on Sandoval and Guerra’s cooperation for this story. But Guerra’s cooperation with SFPD, like Sandoval’s, is spelled out in court documents, transcripts, and repeated unsuccessful attempts by other California law enforcement agencies to put him behind bars.

Guerra’s cooperation might have remained obscure had he not continued committing crimes; ironically, his death was the catalyst for a chain of events that revealed his work as an SFPD informant, and the extent to which authorities intervened to prevent him from being incarcerated for numerous crimes — a freedom which directly contributed to his death.

Guerra, known on the streets as “Spanky,” was a heavyset career criminal whom SFPD first arrested in 1985, when they confirmed his status as a member of the Norteno gang. The San Francisco District Attorney tried Guerra for the attempted murder of Perry Mayorga on July 9, 2001. Mayorga refused to identify Guerra as his assailant during a 2002 hearing and was held in contempt of court. Mayorga said in court he had been approached in the courthouse by an unknown man who “just asked me if bullet holes hurt.” Guerra pleaded guilty to assault with a firearm and received a suspended sentence and two years of probation after serving 472 days in SF County Jail before and during the trial.

Under SFPD’s informant guidelines, Guerra’s shooting of Mayorga would have placed him off-limits for use as an informant.

Guerra also was sentenced to two stretches in state prison for grand theft auto and repeated property crimes in February 2003. It was after being released, in May 2006, that his parole agent, Jeff Gil, hooked him up with SFPD’s Gang Task Force as an informant. But again, this wouldn’t come out until after Guerra’s death.

On July 26, 2007, Jaime Gutierrez and a co-worker were working in Gutierrez’s Mission garage when Guerra pulled up in a red Saab. Guerra knew Gutierrez, a one-time Norteno convicted of two shootings, and since his release had learned of Gutierrez’s business. Guerra tried to extort business checks from Gutierrez, who rebuffed him. (Earlier that day, Guerra had a court date in Modesto for a similar scam.)

Guerra returned 10 minutes later with two other men. All three wore gloves. Guerra pulled out a .38-caliber pistol, asked Gutierrez “if he loved him,” and pointed the weapon at the younger man, telling him that the .38 “already had a body on it.” Gutierrez reached into his office and pulled out a twelve-gauge shotgun. He stepped to the Saab’s passenger door and aimed at Guerra. Guerra fired once, missing Gutierrez. Gutierrez fired twice, tearing into Guerra’s face and body. The other two men leaped out of the car and sprinted away.

Gutierrez jumped into Guerra’s Saab and fled, Guerra’s body in tow, turning himself in at Ingleside Station later that afternoon. Gutierrez told inpectors that he was acting in self-defense. One inspector joked during the interview about Gutierrez turning himself in with Guerra in tow: “How many people turn themselves in with a dead body in the front seat of the car they’re driving?” he said.

When Kamala Harris, then a District Attorney, charged Gutierrez with Guerra’s murder, the garage owner turned to Eric Safire, a combative defense attorney who has frequently courted controversy.

Safire and his investigator Steve Vender are well-versed in gangs; they’re also acquainted with SFPD’s Gang Task Force, an insular unit of 20 officers with a direct line to the FBI and limited oversight.

Safire dug into Guerra’s history, filing subpoenas for the Gang Task Force files on Guerra. Specifically, Safire was looking for indications that Guerra was an informant. Guerra’s criminal record was immediately suspect: “No matter what he did, he got away with it,” Safire says. The DA’s office rebuffed several discovery requests for such material. At one point, Assistant District Attorney Diana Garcia objected to providing Guerra’s 700-page rap sheet.

Vender and Safire’s investigation revealed Guerra’s parole agent, Jeff Gil, had unsuccessfully tried to re-incarcerate Guerra on three occasions since his 2006 release from prison. The first violation was for defrauding a Modesto woman; the second violation involved Guerra attacking two women in Fisherman’s Wharf and pulling a gun on a third on July 8, 2006; the third time, Guerra was stabbed during a brawl with a rival Sureno gang member in the Mission on June 13, 2007: SFPD arrested but didn’t charge him. On all three occasions, Gil recommended Guerra be sentenced.

When Vender asked Gil why Guerra wasn’t sent back to prison, Gil told him that Guerra’s cooperation with the Gang Task Force was “an important factor in the decision to allow Guerra to continue on parole.” (This was another irony to Guerra’s story: Gil was the one who helped Guerra become an informant in the first place.) Gil told Vender that after the Fisherman’s Wharf incident, a member of the Gang Task Force telephoned him to ask for leniency for Guerra.

“The fact that he was arrested and cut loose for criminal conduct indicates SFPD knew he was violating his conduct for being a snitch,” Safire says.

Up to this point, Assistant DA Garcia had filed motions asking the judge to restrict mention of Guerra’s standing as a Norteno lieutenant and references to his gang tattoos and prior crimes. After Safire discovered Guerra’s relationship with SFPD, Garcia contacted Gang Task Force Inspector Ed Yu, who “confirmed that Mr. Guerra was an informant who had worked with him and that he had a file on Mr. Guerra,” according to court documents. Yu met with Garcia on June 11, 2008 and handed over copies of his file on Guerra; however, he requested Garcia withhold Guerra’s file to protect ongoing investigations.

Garage owner Gutierrez was spared conviction by a hung jury in both August 2008 and a year later, in a separate retrial, when the San Francisco DA’s office unsuccessfully tried to use a discredited jailhouse informant to accuse Gutierrez of admitting to Guerra’s murder and plotting to kill Garcia.

In the cases of Guerra and Sandoval, outside circumstances led to both gang members’ removal from society at large. Guerra was killed, and Sandoval was arrested and is currently in Sacramento County Jail while his federal narcotics conspiracy case drags on. But their protection by the San Francisco police department and DA led to a continued threat to public safety in exchange for intelligence which authorities refused to disclose.

“This story reflects some of the worst examples of informant policing, which is law enforcement ignoring informant crimes,” says Alexandra Natapoff, a professor at Loyola Law School in Los Angeles who has studied confidential informants. San Francisco authorities’ decision to allow Guerra and Sandoval to remain at large, Natapoff says, “shows an appalling disregard for public safety, disregard for the potential innocent bystanders, for the safety of people who would come into contact with Sandoval and Guerra, and finally disregard for the safety of the informants themselves.”

Whatever intelligence SFPD gained from Sandoval and Guerra wasn’t worth the risk, she argues. “The ultimate goal is not convictions; the ultimate goal is public safety and the reduction of crime,” says Natapoff. “We have to question whether permitting Sandoval and Guerra to stay at large promoted public safety.”

The three agencies that held the umbrella over Guerra and Sandoval — the Gang Task Force, the Narcotics Bureau, and the DA’s office — illustrate the “Faustian bargain” that law enforcement strikes with confidential informants, says Natapoff. While police and prosecutors operate under the theory that flipping the little fish will lead them to the big fish, Sandoval and Guerra both held rank in their respective gangs, and Sandoval was involved in high-level drug trafficking. Allowing both men to remain free despite their repeated violations of SFPD informant guidelines and, more importantly, their threat to public safety, corrupts the function of the justice system, says Natapoff.

“It sends a terrible message to criminals, which is: You can continue to do your criminal work as long as you work with the government, as long as you’re sufficiently useful,” she says. Crucially, because of state laws that allow law enforcement to keep confidential the activity of informants, legislatures have effectively passed the buck on externally regulating the use of CIs. “Because we don’t regulate this sort of relationship externally, we rely on police departments and prosecutor’s offices to police themselves.”

And experts say that the insulated, self-reinforcing culture of the specialized units that were using Guerra and Sandoval as informants is responsible in part for allowing these relationships to come into being and continue.

“It’s a dreadful culture, they live by lies and deceit while living undercover,” Keane says of high-risk, independent units like SFPD’s Gang Task Force and Narcotics Division. Units with no significant oversight like the Gang Task Force are even more dangerous, because the lack of a formal recruiting structure reinforces the operating logic, modus operandi, and dysfunction of that unit. Drago says that officers given a significant deal of freedom, without the constant supervision that patrol officers receive from their sergeants, can get drawn in too deeply to the criminal world they are charged with disrupting. Such units, he says, “have got to be a tightly run ship,” in terms of how money, informants, and interactions with the criminal element are handled. “The average guy who becomes a cop doesn’t come from or step into that part of the world anywhere as much as these guys,” Drago says. “They’re in it every day.”

Insofar as remedies, both local and state legislatures can intervene. After a young woman arrested for marijuana possession in Florida was coerced into participating in a sting operation that lead to her death in 2008, the state Legislature passed laws limiting the use of confidential informants and structuring guidelines for law enforcement uses of CIs. “Because it’s hard to find out who’s an informant, there has to be a mandate from the legislature that all informants are documented,” says Drago.

SFPD’s structure also means that the San Francisco Police Commission, which Keane once served on, can conduct its own probe into confidential informants. “The San Francisco Police Commission should investigate,” says Keane. The commission has the power to review confidential documentation and institute disciplinary procedures against officers.

This sort of behavior, Keane says, is gotten away with because victims like Liri Lesku are not high-profile, middle-class citizens. “It’s done to people who no one cares about,” he says. “That makes all the difference.”

This story was produced in partnership with The Investigative Fund of The Nation Institute, now known as Type Investigations, with support from The Puffin Foundation.

Reporter Julie Reynolds contributed to this story.