SANTA ANA – A man who was serving life in prison for a murder conviction has been given a new trial because Orange County prosecutors failed to give his lawyer hundreds of pages of evidence about a jailhouse informant.

Leonel Vega’s conviction was set aside this week based on evidence uncovered by attorneys in another case — that of admitted Seal Beach salon shooter Scott Dekraai.

Dekraai’s attorneys at the Public Defender’s Office filed a motion in January alleging a pattern of prosecutorial misconduct, including withholding evidence from defense attorneys. The Orange County District Attorney’s Office has admitted mistakes in some cases, including Vega’s, but prosecutors have said there was no intent to hide evidence.

While it remains to be seen how the allegations of withheld evidence will affect Dekraai, Monday’s ruling in the Vega case appeared to be the first time they’ve led to a conviction being negated. Dekraai, 44, could still face the death penalty for the murders of eight people in 2011.

During a hearing Monday afternoon, Orange County Superior Court records show, Deputy District Attorney Marc Rozenberg and Vega’s lawyer agreed to set aside the conviction and vacate the life sentence in a March 2004 gang-related shooting in Santa Ana. A judge ordered a new trial, but a date hasn’t been set.

Vega’s lawyer, Todd Melnik, saidhe would have filed an extensive motion alleging prosecutorial misconduct — based in part on the revelations in the Dekraai case — if Rozenberg hadn’t agreed to the new trial.

“My feeling is that the last thing the District Attorney’s Office wanted to do was to incur the cost of litigating something like this again,” Melnik said. “And it’s so obvious and out there now that it would be a colossal waste of judicial resources.”

Vega, 34, who’s being held in the Orange County jail with no bail, will have a new jury trial unless he reaches a plea deal or the case is dismissed. Melnik said it was too early to discuss what will happen. Spokespeople for the D.A.’s Office could not be reached Tuesday.

The setting aside of the conviction was first reported by Voice of OC.

Dekraai’s lead attorney, Deputy Public Defender Scott Sanders, has in court papers called the withheld evidence in the Vega case among the “most important and disturbing” he had found, saying it helped prove the existence of what he calls a secret informant program designed to get confessions from people after they had lawyers.

Prosecutors and the sheriff’s deputies who worked as “handlers” for inmate informants conspired to hide the system because they knew they had violated the Constitution, Sanders said.

In a court hearing Tuesday in the Dekraai case, Deputy District Attorney Howard Gundy called that conspiracy theory a “house of cards” that collapsed when testimony in court failed to support it.

But prosecutors have admitted mistakes. Deputy District Attorney Erik Petersen gave Vega’s lawyer only four pages of informant Oscar Moriel’s handwritten notes, but gave 196 pages of Moriel’s notes to a different defendant.

Dan Wagner, the chief homicide prosecutor for the D.A.’s Office, testified in March he believed Vega was one of several defendants who could have a right to seek new trials because of errors.

Robison Harley, the lawyer who represented Vega at trial in 2010, said Sanders did “an outstanding job” of uncovering the truth. Harley said he’d suspected all along he was denied evidence.

“We kept on asking and they kept denying,” he said of the prosecution. “They kept hiding the ball.”

Harley asked Judge William Froeberg to order more evidence turned over. But Harley said he was caught in a Catch-22: The judge challenged Harley to produce evidence, which Harley couldn’t do because the prosecutor hadn’t turned it over.

Vega is accused of killing Giovanni Onofre in March 2004, when Vega was 23. At trial, Petersen said Vega was a passenger in a car that was stopped near a bus stop when Onofre walked over because he thought he recognized someone in the car, according to an appeals court opinion. Vega asked Onofre and his friends where they were from, and when Onofre named his gang, Alley Boys, Vega grabbed a gun from the car and chased after Onofre, Petersen said. Vega was a member of the Delhi gang.

Onofre, who was found near a construction site, dead from a 9 mm gunshot to the head, had been playing basketball with friends.

Vega, who wasn’t charged until 2007, has consistently maintained his innocence, Melnik said. At his trial, family members testified he was home working on his car the day of the shooting.

Moriel, a veteran jailhouse informant, testified Vega gave a detailed account of the shooting and said he’d been driving around “looking for fools from Alley Boys to smoke.” And because Vega’s lawyer didn’t know the full extent of Moriel’s work as an informant, he couldn’t challenge Moriel’s credibility in front of the jury.

Testimony about such gang murders and jailhouse interactions among gang members have frustrated relatives of some of the people killed in Dekraai’s rampage. They’ve said the cases seem irrelevant to Dekraai’s crimes and believe Sanders’ allegations have distracted from seeking justice for the victims.

Dekraai pleaded guilty to the eight murders in May, a move Sanders said was partially intended to offer victims’ families some certainty.

A decision on whether he gets the death penalty is not likely until next year, though Superior Court Judge Thomas Goethals — who’s hearing allegations of wrongly withheld evidence and wrongdoing in the prosecutors’ informant program — could bar it altogether.

Meanwhile, other defense attorneys who believe they were denied evidence about informants are considering seeking new trials.

It’s still not clear what effect the evidence and informant revelations will have on Dekraai’s case, though. In court Tuesday, Goethals said most of the problems exposed in his courtroom about other cases will have to be sorted out by other judges.

Goethals did not mention any cases by name, but said, “The ripples are extending out into other serious cases in our local criminal justice system.”