LOS ANGELES (TNS) — A man accused of fatally shooting Kathryn Steinle in a case that President Donald Trump frequently cited in the national debate over illegal immigration, was found not guilty on all accounts except felony possession of a weapon.

Jurors in San Francisco deliberated for several days before returning the surprise verdict involving Jose Ines Garcia Zarate, a Mexican immigrant in the country illegally who had been deported five times before the fatal shooting.

Prosecutors had given the jury the option to convict Garcia Zarate of first- or second-degree murder or involuntary manslaughter.

Steinle was shot in the back in July 2015, as she walked with her father on San Francisco's Pier 14, near Embarcadero and Mission streets. Less than an hour later, Garcia Zarate, a seven-time felon, was arrested about a mile away from the shooting scene.

His previous brushes with the law and release by law enforcement stoked angry arguments over so-called sanctuary cities.

Then-presidential candidate Trump repeatedly returned to Steinle's killing to make his case for building a wall across the U.S.-Mexico border and to punish cities he accused of not cooperating with immigration enforcement.

"This senseless and totally preventable act of violence committed by an illegal immigrant is yet another example of why we must secure our border immediately," Trump said in a statement two days after Steinle died. "This is an absolutely disgraceful situation, and I am the only one that can fix it."

The president told CNN that year: "This man, or this animal, that shot that wonderful, that beautiful woman in San Francisco, this guy was pushed back by Mexico. Mexico pushes back people across the border that are criminals, that are drug dealers."

In March 2015, when Garcia Zarate finished his third federal prison term for felony re-entry into the United States from Mexico, he was turned over to San Francisco on a decades-old bench warrant for alleged marijuana possession. Prosecutors declined to file charges.

Immigration and Customs Enforcement asked to be notified prior to his release, but city officials did not comply because Garcia Zarate did not meet their criteria, set in 2013, for turning over people to immigration officials. He was freed.

A harsh light fell on what role San Francisco's status as a sanctuary city had in the tragedy, with several then Republican presidential candidates calling for the federal government to punish sanctuary cities.

News outlets reported that politics and the immigration debate were kept out of the courtroom during the trial. The trial hinged on whether jurors believed the killing was intentional and not accidental, as the defense asserted.

The defense said the weapon — stolen a few days earlier from a federal ranger's nearby parked car — went off in the defendant's hands, the San Francisco Chronicle reported.

The prosecutor presented evidence that the pistol that killed Steinle fired only with a firm pull of the trigger and showed that Garcia Zarate threw the firearm into San Francisco Bay after Steinle fell, according to the San Francisco Chronicle. A crime scene inspector also testified that the defendant had to have aimed the gun at Steinle for the bullet to follow the path it did.

Garcia Zarate's attorneys called an expert who testified that it was unlikely that the ricochet shot was intentional, the newspaper reported.

Los Angeles Times staff writer Seema Mehta contributed to this report.