SAN FRANCISCO - A judge has ruled that a man at the center of the national immigration debate will stand trial on a murder charge in the shooting death of a young San Francisco woman.

Judge Brendan Conroy said Friday he heard enough evidence during a preliminary hearing to order the jury trial.

Juan Francisco Lopez-Sanchez, a 45-year-old Mexican national, is charged with first-degree murder in the random shooting death of 32-year-old Kathryn Steinle on July 1. Steinle was shot in the back as she walked with her father along the waterfront.

Get Breaking News Delivered to Your Inbox

Lopez-Sanchez acknowledged shooting Steinle but said the gun fired accidentally. The weapon belonged to a Bureau of Land Management (BLM) ranger and had been reported stolen in June.

The shooting triggered a national debate over immigration after it was revealed that the Sheriff's Department had released Lopez-Sanchez despite a federal request to detain him for possible deportation.

Lopez-Sanchez was previously deported five times.

Republican presidential front-runner Donald Trump has repeatedly mentioned the killing of Steinle as he calls for a border wall and mass deportations to curb illegal immigration. California Sen. Dianne Feinstein and presidential hopeful Hillary Clinton, both Democrats, said Lopez-Sanchez should have been detained.

San Francisco Sheriff Ross Mirkarimi said he was following city law when jailers released Lopez-Sanchez after a 20-year-old marijuana possession charge was dropped. The sheriff said his department requires federal officials to obtain a warrant or some other judicial notice in order for his jail to hold an inmate facing possible deportation.

San Francisco Mayor Ed Lee also criticized the sheriff, saying Mirkarimi should have notified immigration officials of Lopez-Sanchez's impending release.

Lopez-Sanchez has pleaded not guilty in the killing of Steinle.

Her parents have said federal and local authorities contributed to the death through negligence and bureaucratic bungling.

The family alleges in legal claims that a BLM ranger left his loaded service weapon in a backpack in plain view in his car before the gun was stolen in June. The semi-automatic pistol was later used in the killing of Steinle.

BLM spokeswoman Martha Maciel said the agency is cooperating with the investigation of the shooting but she declined further comment.

The Steinle family and their attorneys filed three separate legal claims seeking unspecified damages from the BLM, San Francisco Sheriff's Department and U.S. Department of Homeland Security.

Such claims must be filed before government agencies can be sued.