SAN FRANCISCO (KGO) -- A judge declined Thursday to toss out the confession of a suspect accused of fatally shooting Kate Steinle, 32, at San Francisco's Pier 14 in July.
Defense attorneys argued during a preliminary hearing that police didn't have good reason to arrest Juan Francisco Lopez-Sanchez, 45, an hour after the shooting of Steinle.
The attorneys argued that no one saw Lopez-Sanchez, who is in the country illegally, fire the gun on July 1 and that police arrested him because he was a homeless person acting suspiciously.
Several witnesses took photos of Lopez-Sanchez walking briskly away from Steinle. Police used the photos to arrest Lopez-Sanchez, who then told investigators he accidentally shot Steinle.
"I believe that while the defendant was aware that something happened with the thing he was holding, I actually believe he wasn't aware that someone had been shot on the pier," Matt Gonzalez said.
The fourth day of hearings started with testimony from Aryn Carpenter, a tourist who was staying at a hotel opposite from Pier 14. She took cellphone pictures from her hotel window of the suspect walking away briskly after she heard gunshots. Carpenter said she was suspicious of him because he was the only person walking away from Steinle when everyone else was going toward her.
Prosecutor Diana Garcia also called three officers who responded to the scene. Officer Andrew Bryant was the one who arrested Lopez-Sanchez at Embarcadero and Townsend Street. He's one of the officers in cellphone video of the arrest.
During the preliminary hearing, prosecutor Garcia called a ballistics expert who showed the gun that Sanchez is accused of firing.
Gonzales called only one witness, but he was crucial to his defense that the gun went off accidentally. And former San Francisco Police Department Crime Lab Director Jim Norris said last week that he supported Gonzalez' theory that it was an accidental discharge.
Judge Brendan Conroy ruled Thursday that police acted appropriately in arresting and interrogating the suspect. The judge said he will rule Friday on whether the suspect must stand trial for murder.
The shooting triggered a national debate over immigration after it was revealed that the San Francisco Sheriff's Department had released Lopez-Sanchez despite a federal request to detain him for possible deportation.
Lopez-Sanchez was previously deported five times to his native Mexico.
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.
Sheriff Ross Mirkarimi said his department 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 and some 300 other cities and counties have passed so-called sanctuary laws of non-cooperation with federal immigration officials seeking to detain jail inmates suspected of being in the country illegally.
Prosecutors want to convict Lopez-Sanchez of second-degree murder, which carries a maximum sentence of life in prison.
His public defender Gonzalez argues that the shooting was an accident and his client should be tried for manslaughter rather than murder. The maximum sentence for an involuntary manslaughter conviction is six years.
Lopez-Sanchez says he found the gun used in the shooting of Steinle under a bench on Pier 14. He said the gun accidentally fired when he picked it up.
Ballistic experts testified last week that the bullet ricocheted off the pavement before striking Steinle in the back.
The gun had been reported stolen from the car of a Bureau of Land Management ranger in June.
Steinle's family has filed three separate legal claims seeking unspecified damages from the BLM, San Francisco Sheriff's Department and the U.S. Department of Homeland Security.
The three agencies declined to comment on the claims, which are precursors to lawsuits.
The Associated Press contributed to this story.
Click here for full coverage on the Pier 14 shooting.
Steinle's family and coworkers have set up online fundraising pages to raise money for charities that were important to her. Click here for details on her family's page and click here for information on her coworkers' page.
Judge: Suspect's confession OK in San Francisco Pier 14 shooting
PIER 14 SHOOTING
Federal judge delays gun possession trial against Jose Inez Garcia-Zarate, acquitted of killing Kate Steinle at SF Pier