A California court of appeal on Friday overturned the gun conviction against the man acquitted of murder by a San Francisco jury in the 2015 shooting death of Kate Steinle on the city’s Pier 14.

The state’s First District Court of Appeal reversed the November 2017 verdict that found Jose Inez Garcia Zarate guilty of the lone charge of being a felon in possession of a firearm. Garcia Zarate, 46, was acquitted of homicide charges in the Steinle case that touched off a furor about immigration and sanctuary laws.

Garcia Zarate remains in custody after being indicted by a federal grand jury on charges of being a felon in possession of a firearm and ammunition and being an undocumented immigrant in possession of a firearm and ammunition. He already had enough credits for time served to cover his sentence of the state gun charge.

The court of appeal reversed the conviction in state court on the grounds that the trial judge did not instruct the jury on momentary possession of a firearm, which is not the same as possessing a firearm. Momentary possession is when a person had brief possession of an item while in the process of disposing or destroying it, and they’re not trying to prevent law enforcement from seizing the item.

Matt Gonzalez, chief attorney at the public defender’s office, argued that the killing was unintentional after the defendant found the gun wrapped in a T-shirt under a bench and it went off accidentally on July 1, 2015. The bullet ricocheted off the pier and struck Steinle in the heart.

Garcia Zarate then threw the gun, which had been stolen four days earlier from a federal agent’s car along the Embarcadero, into San Francisco Bay, to stop it from firing, Gonzalez said.

While deliberating on the case, the jury sent a form to Judge Samuel Feng asking for clarification about the definition of possession. Feng, though, did not instruct the jury on momentary possession, the court of appeal found.

“During the deliberation, the jury asked for the definition of possession, whether there is a time requirement of possession and whether defendant’s possession of a firearm and knowledge he possessed it were sufficient to demonstrate wrongful intent,” Judge Sandra L. Margulies wrote in the 3-0 decision.

She added that “it is reasonably probable at least one juror may have reached a different conclusion if the jury had been instructed on the momentary possession charge.”

Gonzalez on Friday called the decision a “vindication.”

“We tried to explain to the judge that by not instructing the jury, he was in effect directing a guilty verdict on this count,” Gonzalez said. “He had an obligation to give this instruction whether or not we asked for it. The court of appeal I think made the right call. This is a very thoughtful decision.”

Leif Dautch, a deputy attorney general and a candidate for district attorney in San Francisco who’s been critical of how prosecutors handled the case, represented the attorney general’s office in the appeal. Dautch, who is on leave from the office while he campaigns, declined to comment on the case.

A spokesman for the district attorney’s office said, “We’re weighing our options.”

Steinle’s death was launched into the national spotlight and the case was seized on by then presidential candidate Donald Trump, who ran on a platform advocating stricter immigration policy.

Before the incident, Garcia Zarate was released from federal prison in Southern California on a conviction of felony re-entry into the country. He was on track for a sixth deportation but was instead brought to San Francisco to face a 20-year-old warrant for a possession of marijuana charge, which was immediately dismissed. He was released in April 2015 under the city’s sanctuary policy — which limits local law enforcement’s cooperation with federal immigration officials.

The Nov. 30, 2017, acquittal on the homicide charges sent off a fresh round of furor from the Trump administration, with the president calling the verdict “disgraceful” on Twitter.

Francisco Ugarte, head of the public defender’s Immigration Unit, who also represented Garcia Zarate, said Friday that the case shows how “sanctuary laws have never been stronger.”

“People are seeing how this administration has exploited a false immigration narrative by selecting cases to levy responsibility based on a person’s immigration status,” he said. “This had nothing to do with sanctuary cities or immigration.”

The U.S. attorney’s office was cleared to move forward with federal charges after the U.S. Supreme Court in June upheld an exception to the “double jeopardy” law that says defendants cannot be tried twice for the same crime.

A person can be tried for the same crime in state and federal court because they are independent jurisdictions, the court found.

Garcia Zarate faces up to 10 years in federal prison if convicted of the federal charges. He is represented by prominent San Francisco attorney J. Tony Serra, who is also representing Derick Almena in the Ghost Ship warehouse case in Alameda County.

On Friday, Serra said he was “jubilant” after hearing about the appeal court’s decision.

“This gives me a huge advantage and highlights the fact that transitory possession is a defense and they found enough facts to warrant a reversal,” he said.

Evan Sernoffsky is a San Francisco Chronicle staff writer. Email: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky