The case of mass murderer Scott Dekraai and allegations that informants were used improperly in Orange County have been cited as legal precedent for the first time in an appellate decision overturning a guilty plea in a shooting case.

Juan Jose Ruiz took a plea deal with a nearly 24-year sentence in June after learning prosecutors planned to use two jailhouse informants to testify against him. Ruiz was charged with shooting at a family in a car in Anaheim in 2013. No one was hit.

Ruiz was picked out by the victims from a photo lineup. He pleaded guilty rather than face a criminal trial and the informants.

What prosecutors failed to tell Ruiz’s lawyers was that the informants – Raymond “Puppet” Cuevas and Jose “Bouncer” Parades – were members of the Mexican Mafia who had been paid $335,000 over four years to snitch on inmates throughout Southern California, according to court records and an appellate lawyer.

Records show the two were paid $600 apiece to get incriminating information from Ruiz.

A hearing will be held in Orange County Superior Court to determine whether Ruiz’s constitutional rights were violated, the Fourth District Court of Appeal ruled on Aug. 18.

The court cited the Dekraai case – in which a judge booted the district attorney’s office from the penalty phase in 2015. Appellate justices said that information withheld from Ruiz’s defense could have been used to question the credibility of the two informants.

The misuse of informants and the withholding of evidence became key accusations in the case of Dekraai, who pleaded guilty to killing eight people in a shooting rampage at a Seal Beach beauty salon in October 2011.

Misconduct in that case was found so egregious that Judge Thomas Goethals not only removed local prosecutors, he spared Dekraai the death penalty for fear he would not be treated fairly in proceedings deciding his punishment.

Ruiz’s is at least the seventh major case that has unraveled or has been dealt a setback because of the Dekraai investigation and revelations that informants were improperly used and evidence was withheld. Using jailhouse informants is legal, except if the target has legal representation and has been formally charged.