A Mexican man acquitted of murder in the shooting death of a San Francisco woman that sparked a national immigration debate has been sentenced to time served for a gun charge.

A judge sentenced Jose Ines Garcia Zarate on Friday to three years in state prison - none of which he will have to serve because he has already spent two and a half years in jail awaiting his trial.

The sentencing came after the judge denied a last ditch effort by Zarate's attorneys to get the conviction thrown out, based on the allegation that the jury had not been given proper instructions about the gun charge.

Jose Ines Garcia Zarate (pictured above in 2015) was sentenced to time served on Friday for a gun charge related to the 2015 accidental shooting of Kate Steinle

While Zarate won't spend any time in prison for the gun conviction, he'll stay in jail for the near future.

Zarate was acquitted in Steinle's death in November, but found guilty of being a felon in possession of a firearm

Federal authorities plan to put him on trial for a similar gun charge, that could send him to prison for up to 10 years - after which he may be deported back to his native country.

Garcia Zarate had been deported five times before he fatally shot Kate Steinle on San Francisco's Pier 14 in July 2015. San Francisco officials released him from jail several weeks before the shooting, ignoring a federal request to detain him for a sixth deportation in line with a 'sanctuary city' policy.

His acquittal reignited the furor of critics - mainly the Trump administration - who say Steinle's death shows the need for tougher immigration policies.

During the trial, Zarate's lawyers argued that the shooting was an accident. They said Zarate found the gun on the pier and it accidentally discharged - striking 34-year-old Steinle.

While Zarate won't serve further time for his state gun possession charge, he awaits trial on federal charges that could send him to prison for 10 years. Above, a memorial near the scene of the shooting

Zarate (left) claimed he found a gun on San Francisco's Pier 14 and that it accidentally went off - striking Steinle (right)

They asked the judge to explain to the jury what 'momentary possession' is - a legal loophole that means a convict can hold a gun or drug briefly without actually beind in voilation of the law.

Feng did not tell the jury about this because it did not apply to Zarate since he threw the gun in the water after the act, hindering police from retrieving it.

His lawyers said he was trying to stop the gun from accidentally going off again, but prosecutors say he was just trying to save his skin.

Steinle's family were not in court for the sentencing on Friday.