SAN FRANCISCO -- Trial is set to begin this week for a Mexican man who set off a national immigration debate after he fatally shot 32-year-old Kate Steinle on a popular San Francisco pier.

Jose Ines Garcia Zarate, 54, acknowledges shooting Steinle in the back while she was walking with her father on the downtown pier July 1, 2015.

"She was just a young woman, starting to be in her prime," Jim Steinle said in 2015. "And had so much to live for."

Get Breaking News Delivered to Your Inbox

Zarate claimed that 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 realize 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.

The 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.

In this July 7, 2015 file photo, Jose Ines Garcia Zarate, right, is led into the courtroom for his arraignment in San Francisco. Michael Macor / AP

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 furor during the presidential campaign, with President Donald Trump repeatedly referring to Steinle's death in his campaign as a reason to toughen U.S. immigration policies.

Since being elected, Mr. 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.