(CNN) The family of a woman allegedly killed by an undocumented immigrant who'd recently been released from jail can't sue San Francisco over its sanctuary policy, according to a recent court ruling.

Kate Steinle's shooting death in 2015 sparked national debate over so-called sanctuary cities and became a rallying cry for Donald Trump on the campaign trail

In a federal wrongful death lawsuit , Steinle's parents had argued that San Francisco and its former sheriff were partly to blame, because officials never notified Immigration and Customs Enforcement when Lopez-Sanchez was released from a local jail in April 2015.

"Kate's death was both foreseeable and preventable had the law enforcement agencies, officials and/or officers involved simply followed the laws, regulations and/or procedures which they swore to uphold," the lawsuit said.

Judge: Law didn't require notifying ICE

In a ruling issued Friday , Magistrate Judge Joseph C. Spero dismissed the family's claims against San Francisco and former Sheriff Ross Mirkarimi.

"No law required the Sheriff's Department to share Lopez-Sanchez's release date with ICE, nor did any law forbid Mirkarimi establishing a policy against such cooperation," Spero wrote.

The magistrate also dismissed the family's claim against ICE.

But he ruled that the family's lawsuit accusing the Bureau of Land Management of negligence can proceed.

Authorities said the gun the shooter used had been stolen from a Bureau of Land Management agent's unattended vehicle.

A spokesman for the US attorney's office declined to comment on pending litigation. Federal attorneys have argued the Bureau of Land Management shouldn't be held liable for crimes committed with the gun after it was stolen.

City: We're not liable for former inmate's actions

In a statement released by its attorney, the city said it is grieving for the Steinle family.

"But the issue that was before the court was whether the city and its taxpayers could be held liable for the actions of a former inmate. Under well-established case law, they can't. The court's ruling reflected that," the statement said. "Kathryn Steinle's death was senseless, and our thoughts are with her family."

Attorneys for Steinle's family did not immediately respond to a request for comment.

Criminal trial set for next month

Lopez-Sanchez faces murder and weapons charges. He's pleaded not guilty.

His trial is scheduled to begin next month.

Sanctuary cities -- a controversial term that supporters don't like -- generally have policies or laws that limit how much local law enforcement and government agencies can work with federal authorities on immigration matters. Some counties and states have similar policies. There's no legal or unified definition for these places.

More than 200 state and local jurisdictions have policies against honoring ICE detention requests, according to the agency's director.