SAN FRANCISCO -- A Mexican man accused of killing a woman on a San Francisco pier in a case that set off a national debate over immigration policy brought the gun and deliberately shot it at people, "playing his own secret version of Russian roulette," a prosecutor said in her closing argument Monday.

Jose Ines Garcia Zarate was playing his own game, San Francisco Deputy District Attorney Diana Garcia told jurors, deriding as implausible the defense argument that he accidentally shot a weapon he didn't know was a firearm. Defense attorneys were scheduled to present closing arguments later.

Garcia Zarate had been deported five times and was wanted for a sixth deportation when Kate Steinle was fatally shot in the back while walking with her father on the pier ina stool for more than 20 minutes before shooting it at Steinle's back.

"He knew exactly what he was doing," Garcia said.

Garcia Zarate said he found the stolen gun wrapped in a shirt under a chair on a pedestrian pier and that the weapon accidentally fired when he picked it up. The bullet ricocheted on the pier's concrete walkway before it struck Steinle.

His attorneys say the ricochet showed the shooting was an accident. Much of the testimony during the monthlong trial has focused on ballistics experts.

A judge ruled last week that the jury of six men and six women can consider a more serious charge of first-degree murder in addition to a second-degree murder charge. Jurors are expected to get the case after closing arguments.

Before the shooting, Garcia Zarate