The family of a woman allegedly killed by an illegal immigrant who was deported five times cannot sue the city of San Francisco, a judge ruled.

Kate Steinle, 32, was reportedly shot dead by Juan Francisco Lopez-Sanchez, 45, a Mexican national with a long criminal record who was allowed to remain in the country due to the city's controversial sanctuary policies.

The Steinle family argued in a wrongful death suit that the city and former sheriff should be held responsible for her murder.

The family of Kate Steinle, left, who was killed by an illegal immigrant who was deported five times cannot sue the city of San Francisco, a judge ruled

Lawyers argued that if city officials had notified Immigration and Customs Enforcement when they released 7-time felon Lopez-Sanchez from prison in April of 2015, Kate's death could have been avoided.

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

However, Judge Joseph C Sparo dismissed their claims on Friday, according to KTLA.

Kate's parent's case against the city of San Francisco and a former sherriff has been dismissed: Liz Sullivan, left, and Jim Steinle, right, parents of Kate Steinle, fight back tears as they recall how their daughter was shot to death right in front of her father's eyes during a family outing

The Steinle family, including brother Brad Steinle who became emotional on television after his sister's death, still have a case against the Bureau of Land Management

He wrote: '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'.

Kate's death caused an uproar when it occurred last year and became a rallying cry for Donald Trump's immigration policies while on the campaign trail.

Sanctuary cities have no clear definition or geographic limit. They are scattered throughout the country and generally limit the ability of government workers to assist the federal government with immigration matters.

In San Francisco, the City and County of Refuge ordinance, passed in 1989, 'prohibits city employees from helping federal immigration enforcement efforts unless compelled by court order or state law', according to CNN.

The Steinle family may still have an opportunity to seek justice, as the judge allowed their case against the Bureau of Land Management (BLM) to continue.

Lopez-Sanchez reportedly stole the gun he used to kill Kate from a BLM unattended vehicle.

Lopez-Sanchez stole the gun he used to kill Kate from a Bureau of Land Management unattended vehicle, shooting her in the back while on a family outing

Lopez-Sanchez shot Kate in the back as she walked along a pier with her father, but claims the gun went off by accident.

The family believes the BLM should be held accountable for crimes committed using the weapon.

Kate's killer is scheduled to stand trial next month and has entered a plea of not guilty.