Senate lawmakers on Wednesday blocked legislation aimed at stopping violent crimes committed by illegal immigrants.

The "Stop Dangerous Sanctuary Cities Act" would revoke federal grants provided to so-called sanctuary cities that refuse to comply with Homeland Security requests to detain illegal immigrants. The bill is meant to put pressure on those cities to cooperate with the federal government on these issues.

The bill is one of the legislative reactions to the death of Kate Steinle, who was killed on a San Francisco pier by an illegal immigrant. After her death, city officials defended their decision not to cooperate with federal authorities on deporting illegal immigrants.

While Republicans say those sorts of incidents show the government needs to put more pressure on sanctuary cities to follow federal guidance, Democrats disagree, and they helped scuttle the bill in the Senate. Republicans needed 60 votes to let the bill advance in a 53-44 vote.

Democrats have said the bill is anti-immigrant and would hurt local communities. Civil rights groups have lobbied Democrats to oppose the bills, arguing they would damage the ability of police to build trust with immigrant communities.

Democrats also blocked a second related bill, the "Stop Illegal Reentry Act," which would require mandatory minimum sentences standards for those who have been deported and then come back into the United States illegally and are convicted of an aggravated felony.

The bill is named after Steinle, and was introduced by Sen. Ted Cruz, R-Texas.

"Congress must prevent cities from harboring illegal aliens, and it must hold this administration accountable for its failure, if not its outright refusal, to enforce federal immigration laws and ensure the safety and security of the American people," Cruz said.

But Democrats disagreed, and again shut down the bill in a procedural vote that failed to get 60 votes, 55-42.