Senate Democrats on Tuesday blocked legislation that would have withheld federal funds from "sanctuary cities" that refuse to cooperate with federal immigration authorities and instead work to protect illegal immigrants from deportation.

Senators voted 54-45 on the procedural measure to end debate on the sanctuary city legislation, falling short of the 60 votes needed to overcome the hurdle and send the bill itself up for vote, reported The Washington Post.

The bill was introduced by Sen. David Vitter, R-La., and would have blocked federal grants to sanctuary cities and increased criminal penalties for undocumented aliens who are convicted of a serious crime after being repeatedly deported, according to The Hill.

The House passed a similar bill in July, weeks after sanctuary cities captured the political spotlight due to the shooting death of 32-year-old Kate Steinle on a San Francisco pier, allegedly at the hands of an illegal immigrant who had been deported five times and had a long criminal record. Weeks before Steinle's death, law enforcement authorities in the sanctuary city of San Francisco decided to release the immigrant from jail rather than turn him over to federal authorities seeking to deport him.

Ahead of the Tuesday vote, Senate Majority Leader Mitch McConnell, R-Ky., referenced Steinle's death and asked Democrats to "put compassion before left-wing ideology today," according to The Hill.

Republican presidential candidate Sen. Ted Cruz of Texas said on the Senate floor: "The city of San Francisco is proudly a sanctuary city. They say to illegal immigrants across the country and across the world, 'Come to San Francisco. We will protect you from federal immigration laws.' These policies are inexcusable," according to the Post.

But Democrats denounced the bill as mere pandering to the GOP base and said the legislation would undercut law enforcement and fail to solve the underlying immigration problem.

"Today's vote is nothing but a political show vote. Senator Vitter knows his legislation has no chance of passing the Senate or being signed into law," Sen. Charles Schumer, D-N.Y., said ahead of the vote, according to The Hill.

Minority Leader Harry Reid, D-Nev., called the bill "vile" and referred to it as the "Donald Trump Act," a reference to 2016 GOP front-runner Donald Trump, who has made immigration a central tenet of his campaign.

The White House said in a written statement that the bill "fails to offer comprehensive reforms needed to fix the Nation's broken immigration laws and undermines current Administration efforts to remove the most dangerous convicted criminals and to work collaboratively with State and local law enforcement agencies," adding that it would "essentially turn State and local law enforcement into Federal immigration law enforcement officials, in certain circumstances."

President Barack Obama vowed earlier on Tuesday to veto the bill if it passed the Senate, reported The Washington Times.

The number of sanctuary cities in the U.S. has risen to 340, a sharp increase since July, when 276 jurisdictions had policies in place to protect illegal immigrants from deportation by refusing to comply with federal immigration authorities, as HNGN previously reported.

The cities are responsible for releasing an average of 1,000 illegal criminal aliens per month, according to a new report by the Center for Immigration Studies (CIS) based on data from the Department of Homeland Security.

Between Jan. 1 and Sept. 30, 2014, local sanctuary cities freed 9,295 illegal immigrants, ignoring detainer requests that U.S. Immigration and Customs Enforcement (ICE) had placed on the immigrants so that it could begin deportation proceedings once local officials released the immigrants from custody. More than 600 of those aliens were released at least twice by local authorities, according to CIS.

In a recent poll, 62 percent of Americans told Rasmussen that they think the U.S. Justice Department should take legal actions against sanctuary cities that shield illegal immigrants from deportation.