A state appeals court panel this week upheld the convictions of a man and woman for the shooting and beating of a man who died nine days after being left in the desert in the Lake Los Angeles area.

The three-justice panel from California’s 2nd District Court of Appeal found that the evidence against Rudolfo Alcantar and Rosie Lee Morales was “strong.’’

But the appellate panel overturned jurors’ findings of gang and firearm allegations against the two and sent the case back for retrial on those allegations, finding that testimony from two witnesses had been erroneously admitted.

“We have found it necessary to vacate the gang enhancement findings for evidentiary error, and because the gang findings are invalid, there is no basis to affirm firearm findings that depended on the truth of those findings to dispense with the need for the prosecution to prove which of the defendants personally used or discharged the firearm,’’ the justices found. “We must therefore vacate the firearm findings, as well.’’

The two would otherwise be re-sentenced if the prosecution opts not to re-try the allegations, according to the panel’s ruling.

In their 65-page ruling, the justices noted that Morales confessed to police detectives that she had lured the victim, Christian Bojorquez, into the desert under false pretenses in March 2012, was present when Alcantar shot Bojorquez, prevented him from getting away and later burned his vehicle and other evidence that would have incriminated her and Alcantar.

“Even though he did not confess involvement in Bojorquez’s killing to law enforcement, as did Morales, the evidence of his guilt was still strong,’’ the panel wrote, noting that jurors heard evidence that Alcantar’s DNA was found at the remote scene of the crime and that three witnesses had seen him driving the victim’s vehicle shortly after the shooting.

The victim, who had been loosely associating with gang members, was targeted because he was believed to have been a “snitch’’ following a contact with police in November 2011, according to evidence presented during their trials before separate juries.

Alcantar was convicted of first-degree murder and two counts of possession of a firearm, with jurors finding true the special circumstance allegations of murder while lying in wait and murder during the commission of a carjacking. He was sentenced in March 2017 to life in prison without the possibility of parole.

Morales was found guilty of second-degree murder and arson of property and was sentenced to 48 years to life in state prison.

Lancaster resident John R. Eldridge, who came upon the victim while riding his motorcycle in the desert, was lauded earlier this month by Los Angeles County District Attorney Jackie Lacey as a “courageous citizen’’ for calling 911 to get help for the 21-year-old victim, who died nine days later.