Senate Democrats blocked legislation that would punish “sanctuary cities” in a 54-45 vote Tuesday afternoon.

The bill, called the Stop Sanctuary Policies and Protect Americans Act, needed to overcome a 60-vote threshold. It would withhold certain federal funding from states or cities that refuse to comply with requests from federal immigration officials to turn over immigrants who are in the country illegally.

Screen Shot 2015-10-20 at 4.13.27 PM

Sen. David Vitter, R-La., introduced the legislation, which includes a provision known as Kate’s Law, named after 32-year-old Kate Steinle, who was fatally shot in San Francisco on July 1. The bill would impose a mandatory minimum jail sentence of five years for illegal immigrants who are convicted of re-entering the United States after being convicted of an aggravated felony or have three strikes for trying to enter the country illegally.

“It’s maddening that the Democrats are encouraging sanctuary cities like New Orleans that refuse to cooperate with federal immigration enforcement and let dangerous criminal illegals free,” Vitter said in a statement after the bill failed.

Vitter has been pushing to defund sanctuary cities since 2007, when he served as chairman of the Border Security Caucus.

Sanctuary policies vary from state to state, but they generally prevent local authorities from cooperating with federal immigration officers, allowing those localities to protect undocumented immigrants from deportation. There are currently 340 sanctuary cities in the United States, according to the Center for Immigration Studies.

The issue of sanctuary cities gained national attention when Steinle was killed this summer by Juan Francisco Lopez-Sanchez, an illegal immigrant who had seven prior felony convictions in the U.S. and had been deported to Mexico five separate times. He was released from a San Francisco jail in April under a city law barring the jail’s deputies from informing U.S. Immigration and Customs Enforcement of his release, despite the agency’s previous notification request.

Opponents of the Stop Sanctuary Policies and Protect Americans Act question the taxpayer cost of implementing mandatory minimums at a time when Congress is working to reform the criminal justice system. Some, including Senate Minority Leader Harry Reid, D-Nev., even mocked the legislation, calling it the “Donald Trump Act.”

“This Donald Trump Act was designed to demonize immigrants and spread the myth that they are criminals and threats to the public,” Reid said on Monday.

During his bid for the 2016 GOP presidential nomination, Trump highlighted Steinle’s death as an example of why the country needs stricter immigration policies.

In July, the White House issued a veto threat on similar legislation that passed in the House, saying the measure “undermines current administration efforts to remove the most dangerous convicted criminals.”

Earlier this month, the Center for Immigration Studies, an organization that supports reduced immigration, identified the 340 cities, counties, and states that are considered sanctuary locations.

(Photo: Center for Immigration Studies)

(Photo: Center for Immigration Studies)

A government report commissioned for Congress by the U.S. Immigration and Customs Enforcement found that sanctuary cities released more than 9,000 illegal immigrants whom federal authorities were seeking to deport between Jan. 1 and Sept. 30, 2014. As of last year, 69 percent of those were still at large in the United States.

Of those still at large, 1,377 had another criminal arrest that resulted in the detainer. Of the 6,460 criminal aliens who were still at large during the time period studied, 3,802 (58 percent) had prior felonies or violent misdemeanors.