LOS ANGELES ― Oscar “Scar” Moriel has testified to murdering five or six people ― he can’t remember exactly.

Moriel is a former member of a notorious street gang who testified that he would go out and “hunt” for his victims. He has been incarcerated for more than a decade, facing life in prison for charges that include attempted murder and a carjacking.

But Moriel will not be spending the rest of his life behind bars; in fact, he’ll be a free man in less than four years. That’s because Moriel is a prolific jailhouse informant, a player in Orange County’s notorious jail informant scandal who has helped federal and local law enforcement on their cases.

After more than 80 delays of his case, Moriel on Friday received a sweetheart deal from the Orange County District Attorney’s office: Superior Court Judge Patrick Donahue sentenced him to a total of 17 years for attempted murder. With the time he has already served, that leaves Moriel facing just about three and a half more years behind bars. The witness protection program will get him a new identity come 2021, and he will be a free man once again.

“Moriel has committed very serious crimes,” United States Attorney Joseph McNally said in court Friday. But McNally added that the informant’s work was critical to the government’s gang crackdown in Orange County. Assistant District Attorney James Laird, the prosecutor for Moriel’s case, called the informant “instrumental.”

Even if you’re a serial killer, and even if you’re caught on tape admitting that the quality of your testimony is based upon what you get in return, there’s room for you to work as an informant for the OCDA. assistant public defender Scott Sanders

Moriel was a high-ranking member of Orange County’s Delhi gang, a longstanding street gang in the county that also serves as a subsidiary of the Mexican Mafia. But by 2009, he was sitting in a jail cell in Orange County awaiting trial for trying to murder a man in Santa Ana four years earlier. He had committed a carjacking at knifepoint the year before. As a candidate for California’s three-strikes law, Moriel was facing 25 years to life in prison and was in need of some options.

So, in February 2009, Moriel requested a meeting with Santa Ana police detectives Charles Flynn and David Rondou. He told them he was ready to turn snitch and help the cops solve some of their cases.

If an inmate decides to snitch on his jail neighbors, the perks can be life-changing: money, food delivery, video games ― or, as in Moriel’s case, an eventual reduced sentence and freedom.

“I might be able to help you if my memory can fall back in place,” Moriel told Flynn during a recorded interview. “It might not be able to fall back in place because it’s a long time ago. People forget. If I can grab spots of my memory and make it seem like it was yesterday.”

He just needed a little help to jog his memory.

“Some options, options would be nice,” Moriel said. “Right now I’m in a place with no options. I’m looking at third strike, I’m looking at life in prison. So the more options I have to work with and to choose from the better position I’ll be in to think more clearly.”

And thus began a working relationship between Moriel and county cops and prosecutors. Moriel initially shared information regarding a local homicide case that had gone cold. By July 2009, he had signed an informant agreement with local law enforcement to work with them in secret, gathering evidence from within jail that might help their cases.

During that July meeting, police engaged in a disturbing conversation with Moriel ― one of what would become many. They discussed a potential future military career for the informant that would allow him to kill people legally. Orange County sheriff’s deputies Ben Garcia and Bill Grover ― two men who would later emerge at the center of the county’s snitch scandal for giving false testimony about their work with informants ― accompanied Flynn, who did most of the talking.

Listen to the audio of Moriel’s interaction with local law enforcement, which HuffPost obtained and reported on in 2015:

“Have you heard or do you think it’s possible after all this is done ... I can go into the military?” Moriel asked the detectives. Flynn acknowledged that it was a real possibility.

“You want to legally kill some people, huh,” Grover said.

“Yeah, I want to go fight,” Moriel responded. “If that’s possible, I want to go.”

Flynn replied: “It’s much nicer when Uncle Sam’s behind you on it. … Then you know you get away with it.”

“That’s cool,” Moriel said.

At the time of those conversations, the participants had no reason to believe their words would ever be heard again. And Flynn suggested as much to Moriel during one of their meetings.

“Let me tell you this right now,” Flynn said as they discussed an informant agreement that Moriel was considering signing. “This goes in a file that I have for you that gets locked in a safe, but no one but I have access to and it never, ever comes out. This goes in my file in my safe at the police station, and no one has access to it.”

Moriel spent the next four and a half years serving as a key informant for the cops and prosecutors. He testified in two high-profile murder trials as well as in the first trial in the wake of a sweeping federal Mexican Mafia crackdown in Orange County. He first received money and, in 2011, witness protection.

Neither the OCDA nor the Santa Ana Police Department immediately responded to a request for comment.

In a press release, OCDA said the FBI and U.S. Attorney’s Office requested lenience for Moriel as a result of his “ongoing cooperation and assistance in identifying multiple criminal street gang members affiliated with the Mexican Mafia.” OCDA also said the office gave “great deference” to the federal agencies’ request.

As for Moriel’s own admission that he participated in the murders of other people, Laird said law enforcement has exhausted all efforts to find his victims. Those crimes remain unsolved.

Details of the county’s jailhouse snitch program were mostly unknown in 2009. These recordings, and others, remained hidden until assistant public defender Scott Sanders uncovered them.

“What a message this sort of deal sends,” Sanders told HuffPost. “Even if you’re a serial killer, and even if you’re caught on tape admitting that the quality of your testimony is based upon what you get in return, there’s room for you to work as an informant for the OCDA ― there’s an unbelievable Christmas present waiting.”

In a blistering 505-page motion filed in 2014, Sanders argued that hundreds of pages of notes written by Moriel, and another informant Fernando Perez, demonstrated the existence of an illegal jailhouse snitch program. For the program, sheriff’s deputies allegedly planted informants next to targeted inmates and directed them to fish around for incriminating evidence.

Sanders argues that prosecutors would then present in court the damning evidence gleaned by the informants while withholding other information that could have been beneficial to defendants ― a violation of their right to due process.

Additional damning evidence of the informant program came to light over years that followed. Sanders’ efforts ultimately revealed a disturbing trove of long-hidden records: a 25-year-old computerized system that detailed critical information about jail inmates and informants; more than four years worth of logs created by deputies who managed the informants, which were ended days before a judge issued an order requiring their disclosure in 2013; and internal sheriff’s department memos, including one boasting of “hundreds of informants.”

Altogether, the records detailed a robust and well-established practice of cultivating and utilizing jailhouse informants against unsuspecting defendants.

Nonetheless, the Orange County Sheriff’s Department has continued to deny that a jail informant program exists. In recent hearings, Sheriff Sandra Hutchens and members of her command and management staff suggested that any informant-related misconduct by deputies must have been the work of a handful of rogue officers operating independently of their orders. Three deputies refused to testify at the hearings, invoking their Fifth Amendment right to silence.

Leaders of the sheriff’s department have also said they have made changes to how deputies handle inmates in the jail. The OCDA office has maintained that any misconduct by county prosecutors was unintentional and that the scandal has been overblown.

An Orange County grand jury report issued this July largely lined up with both agencies’ sentiments, calling the scandal a “myth” perpetuated by the media. But legal experts blasted the grand jury’s report and said its findings were just further proof that an independent probe was desperately needed.

California’s 4th District Court of Appeal found last year that misconduct by prosecutors and sheriff’s officials in Orange County was very real and that the “magnitude of the systemic problems cannot be overlooked.” A month later, the U.S. Department of Justice announced an investigation into the use of jailhouse informants in the county.

The scandal has led to the unraveling of more than a dozen murder, attempted murder and felony assault cases in the county, and it continues to threaten more. In September, the scandal upended the case of Scott Dekraai, the shooter in the worst mass killing in Orange County history.

“Moriel’s sentencing is just another perfect example of the incompetency that exists in the Orange County District Attorney’s office in prosecuting murderers with the correct sentences that they deserve,” Paul Wilson told HuffPost. Wilson’s wife, Christy, was one of the eight people killed by Dekraai at a Seal Beach salon in 2011.

“Prosecutors shook the hand of a serial killer and gave him a sweetheart deal,” Wilson added. “This is what it says to us: This is how you murder and get away with it in Orange County, especially when you have a district attorney’s office and sheriff’s department that cheats and lies.”