San Francisco — Trial is set to begin this week for a Mexican man who set off a national immigration debate after he shot and killed a woman on a popular San Francisco pier.Jose Ines Garcia Zarate, 54, acknowledges shooting Kate Steinle in the back while she was walking with her father on the downtown pier July 1, 2015.But Zarate said the shooting was accidental. He said he was handling a handgun he found wrapped in a T-shirt under a bench on the pier when it accidentally fired.The handgun belonged to a Bureau of Land Management ranger who reported that it was stolen from his parked car in San Francisco a week before Steinle was shot.The San Francisco district attorney's office has charged Zarate with second-degree murder, which could result in a maximum sentence of 15 years to life in prison.Assistant District Attorney Diana Garcia declined to comment.Zarate's attorney Matt Gonzalez said his client didn't realise the bundle he picked up contained a firearm, and it went off as he unwrapped the T-shirt."He didn't know it was a gun when it fired," Gonzalez said. "It all happens in a span of three seconds."Prosecutors charge otherwise, alleging Zarate recklessly pointed the gun at people on the pier.Political furoreThe suspect originally went by the name Juan Francisco Lopez-Sanchez when he was arrested. But his lawyer Matt Gonzalez said he now prefers to be called by his birth name of Zarate.Opening arguments are scheduled for Monday.Zarate had been deported five times and was homeless in San Francisco when he shot Steinle.He had recently completed a prison sentence for illegal re-entry when he was transferred to the San Francisco County jail to face a 20-year-old marijuana charge.Prosecutors dropped that charge, and the San Francisco sheriff released Zarate from jail despite a federal immigration request to detain him for at least two more days for deportation.The sheriff's department said it was following the city's sanctuary policy of limited cooperation with federal immigration authorities.The shooting touched off a political furore during the presidential campaign, with President Donald Trump referring to Steinle's death in his campaign as a reason to toughen US immigration policies.Since being elected, Trump has threatened to withhold federal funding to so-called sanctuary cities such as San Francisco, several of which have filed lawsuits to prevent the move.None of that is at issue during the trial, and the judge has barred mention of the politics of immigration and gun control during the proceedings.