Sen. Ted Cruz, R-Texas, delivered a speech Tuesday on the Senate floor in support of the Stop Sanctuary Policies and Protect Americans Act, legislation he co-sponsored that would deny some federal funds to “sanctuary cities,” or jurisdictions that don’t uphold federal immigration law.

The legislation was later defeated in a 54-45 vote; it needed 60 votes to advance. The White House has indicated that the president would veto the legislation.

“Americans are tired of seeing their laws flouted and their communities plagued by the horrible crime that typically accompanies illegal immigration,” said Cruz. “But for too long, the pleas of the American people on this issue have gone unheeded here in Washington.”

Cruz accused “the political class and the business class—our nation’s elites” of promising “enforcement at some point in the future but only on the condition that the American people accept a pathway to citizenship now for the millions of illegal immigrants who are already in this country.”

Cruz said the Obama administration’s “refusal to enforce the laws” isn’t the only problem, but also the “scandalously poor enforcement of our immigration laws,” and that the legislation would rein in the “lawlessness” of the jurisdictions.

“Although these jurisdictions are more than happy—eager, even—to take federal dollars, they go out of their way to impede federal immigration enforcement by adopting policies that prohibit their law enforcement officers from cooperating with federal officers. Some of the jurisdictions even refuse to honor requests from the federal government to temporarily hold a criminal alien until federal officers can take custody of the individual.”

“Not only are these sanctuary policies an affront to rule of law; they are extremely dangerous,” Cruz added.

Cruz said that in 2013, the Obama administration “released from detention roughly 36,000 convicted criminal aliens who were actually awaiting the outcome of deportation proceedings.”

According to Cruz, these “criminal illegal aliens” accounted for 193 homicide convictions, 426 sexual assault convictions, 303 kidnapping convictions, 1,075 aggravated assault convictions, and 16,070 convictions of driving under the influence of alcohol.

“All of this was on top of the additional 68,000 illegal immigrants with criminal convictions that the federal government encountered in 2013 but never took into custody for deportation.”

He called the legislation “just a small step, but at least it is a step in the right direction.”

“We must send the message that defiance of our laws will no longer be tolerated—whether it is by the sanctuary cities themselves or the illegal re-entry offenders that they harbor,” Cruz said. “The problem of illegal immigration in this country will never be solved until we demonstrate to the American people that we are serious about securing the border and enforcing our immigration laws—until we have a president willing to, and in fact committed to actually enforcing the laws and securing the borders.”

The Daily Signal recently reported that there are currently 340 sanctuary cities in the United States.