An undocumented Mexican immigrant was acquitted of murder and manslaughter charges on Thursday in the killing of Kathryn Steinle, whose death while out walking on a San Francisco pier became a touchstone in the national debate over immigration fueled by Donald J. Trump.

The man, Jose Ines Garcia Zarate, 45, who was also found not guilty of assault with a firearm, was convicted only of being a felon in possession of a firearm after a trial that lasted more than five weeks. His sentence could range from 16 months to three years. Mr. Zarate has already spent more than two years in county jail awaiting trial. A sentencing date had not yet been set.

Ms. Steinle’s death in July 2015 fed into a fierce debate over whether immigrants without legal status — Mr. Garcia Zarate had been deported five times — should be dealt with more aggressively, and over the role local law enforcement should play.

Mr. Trump invoked her killing as he campaigned for president and tried to rally national support for his hard-line immigration agenda, which ultimately helped to catapult him into office.