A California court overturned the conviction Friday of a five-time deported homeless illegal immigrant who shot Kate Steinle in 2015.

The 1st District Court of Appeals ruled that the trial judge erred in not giving the jury “the momentary possession instruction,” NPR reported.

“It is undisputed that defendant was holding the gun when it fired. But that fact alone does not establish he possessed the gun for more than a moment. To possess the gun, defendant had to know he was holding it,” the appellate court wrote, according to NPR.

Jose Ines Garcia-Zarate was deported five times before he shot Steinle on a San Fransisco pier in 2015. Zarate was a seven-time convicted felon and Mexican national. Before he shot Steinle, Immigration and Customs Enforcement lodged a detainer for Zarate with the San Francisco sheriff’s office. The office did not honor the request, according to former Acting ICE Director Thomas Homan’s statement.

Steinle’s death ignited national debate over illegal immigration and was a major talking point for President Donald Trump during his campaign. (RELATED: Jury Finds Illegal Immigrant NOT GUILTY In Kate Steinle Murder)

A jury acquitted Garcia-Zarate of the charge of murdering Steinle in November 2017 but convicted him of being a felon in possession of a gun.

His attorneys argued the shooting was an accident — that Garcia-Zarate found the gun under a bench, accidentally caused the gun to fire, and the bullet ricocheted off the pier and hit Steinle, who was walking about 78 feet away with her father.

Garcia-Zarate himself admitted to firing the shot that killed Steinle at the trial but said it was an accident, saying the gun “went off.”

Under the gun possession conviction, Garcia-Zarate faced three years in prison. He now faces immigration and gun charges. His defense attorney Tony Serra said Garcia-Zarate may be tried locally on a state gun charge, according to NPR.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.