Despite finding that a San Francisco police officer had testified falsely, a federal appeals court upheld the murder conviction of a local gang member Monday for fatally shooting the leader of a rival gang in the Mission District.

Marcos Reis-Campos, 18, shot 35-year-old Luis Fuentes, a leader of the Mara Salvatrucha or MS-13 gang, as Fuentes was walking with his 6-year-old son at 24th and Hampshire streets in June 2004. Reis-Campos, a Norteños gang member, said Fuentes had previously threatened his life and had reached for Reis-Campos’ gun before the shooting, but a jury rejected his claim of self-defense and convicted him of second-degree murder in 2007. He was sentenced to 50 years to life in prison.

A police investigator on the case, Sgt. Mario Molina, testified he had been unaware of Fuentes’ high rank in MS-13 and had known him primarily from soccer games at a local playground. The prosecutor, in closing arguments to the jury, described Fuentes as a painter and a “family man.”

Molina also testified that he was unaware of any retaliation ordered by MS-13 for the killing of one of its members by a Norteños gangster in March 2004. But after Reis-Campos’ conviction, his lawyers learned that Molina had taken part in an investigation of MS-13 and had known before the trial that Fuentes ordered a 15-year-old gang member to kill a Norteño in Daly City to avenge the killing.

Defense lawyers sought a new trial, arguing that the prosecution had withheld the information and that it would have undermined Molina’s testimony.

The Ninth U.S. Circuit Court of Appeals in San Francisco criticized the officer’s conduct Monday, but said it was not enough to overturn Reis-Campos’ conviction.

The jury heard testimony that Fuentes had been the “shot caller” of MS-13, “a vicious street gang responsible for murders and violence in San Francisco,” Judge John Owens said in the 3-0 ruling.

“The prosecutor’s withholding of information and Molina’s false testimony are very troubling,” Owens said. But he said a 1996 federal law requires federal courts to defer to state courts’ factual findings — in this case, an appellate court’s conclusion that none of the evidence withheld by the prosecution would have led the jury to believe that Reis-Campos had acted in self-defense.

Defense lawyer Dennis Riordan said he would ask the full appeals court to order a new hearing.

“I think this is a clear instance, and there are others, where state courts have turned a blind eye to prosecutorial misconduct and police perjury” and federal courts have gone along because of the 1996 law, Riordan said.

Lawyers for the prosecution were not immediately available for comment.

Bob Egelko is a San Francisco Chronicle staff writer. Email: begelko@sfchronicle.com Twitter: @egelko