Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Mexican immigrant acquitted of murder in the 2015 shooting of Kathryn Steinle on a San Francisco pier was sentenced to time served Friday for weapons possession, but he did not walk out of court a free man.

Jose Ines Garcia Zarate, 45, was taken into custody by U.S. Marshals even though he already served more than two years behind bars while awaiting trial for the Steinle killing.

That's because Garcia Zarate was indicted by a federal grand jury in December on charges of being a felon in possession of a firearm and ammunition and being an “illegally present alien” in possession of the same.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Jose Ines Garcia Zarate, right, is led into a courtroom by San Francisco Public Defender Jeff Adachi, left, and Assistant District Attorney Diana Garciaor, center, for his arraignment at the Hall of Justice in San Francisco on July 7, 2015. Michael Macor / San Francisco Chronicle via AP file

The charges carry a maximum sentence of 10 years in federal prison, and if convicted Garcia Zarate would likely be deported back to Mexico — for the sixth time — after serving his sentence.

Garcia Zarate's public defender, Matt Gonzalez, was seeking a new trial on his weapons possession conviction. He argued that the immigrant didn’t have the handgun long enough for it to constitute true possession — Zarate had found it wrapped in a shirt under a chair on a pier and the gun went off by accident the moment he picked it up.

That shot killed the 32-year-old Steinle, who died in her father’s arms on July 1, 2015. Adding another tragic twist, the weapon had been stolen from a federal Bureau of Land Management ranger a week before.

But Judge James Feng denied Gonzalez's motion for a new trial.

Kathryn Steinle was shot dead at San Francisco's Pier 14 while out for an evening stroll along the waterfront with her father. Steinle Family

Garcia Zarate was found not guilty of murder on Dec. 1 — a verdict that was a crushing blow to Steinle’s father, Jim, and that was denounced by President Donald Trump.

In the summer of 2015, Steinle became a rallying cry for then-candidate Trump and hard-liners on illegal immigration after it was revealed that Garcia Zarate had been deported to Mexico five times before and been arrested numerous times on drug charges.

Meanwhile, San Francisco officials have been forced to defend their “sanctuary city” policy, since it was revealed that the homeless man had been released from jail three months before the fatal shooting.

Garcia Zarate had finished a federal prison sentence for illegal re-entry into the U.S. and was transferred in March 2015 to a San Francisco jail to face a 20-year-old charge of selling marijuana. He was freed after the district attorney dropped the charge over the objections of federal immigration authorities who wanted to ship him back to Mexico.