The House passed two bills Thursday to boost President Donald Trump’s immigration crackdown.

The bills — "Kate’s Law" and the "No Sanctuary for Criminals Act" — would up the penalties on undocumented immigrants who attempt to reenter the country illegally after being deported for crimes and slash funds from cities that protect them.

Kate's Law passed 257-167, largely along party lines, in the GOP-controlled House. Trump, who made immigration a key focus during the campaign and in his administration, celebrated its passage.

Good news, House just passed #KatesLaw. Hopefully Senate will follow. — Donald J. Trump (@realDonaldTrump) June 29, 2017

Under the legislation, an undocumented immigrant previously convicted of a crime who attempts to re-enter the country could face between 10 and 25 years in prison.

The legislation is named after Kathryn Steinle who was shot and killed in 2015 in San Francisco by Juan Francisco Lopez Sanchez, a repeat felon and undocumented immigrant from Mexico who had been deported several times.

"The legislation before us today is one born of a preventable tragedy," said Rep. Brian Fitzpatrick, R-Pa., who co-sponsored the bill. “Let this bill be her legacy. Let this bill result in Kate saving the lives of others.”

A Senate version of the bill failed to pass in 2016.

Many Democrats panned the legislation, calling it anti-immigrant and saying it would stoke fear.

Rep. Jerrold Nadler, D-N.Y., called the measure "callous and irrational."

Others said it could target legal immigrants.

"Yes, we must keep out the 'bad hombres,' but we must continue to welcome those who come to America to work hard and contribute," said Rep. Lou Correa, D-Calif., using a phrase that Trump had used. "This bill fails to make this critical and important distinction. Do not brand millions of immigrants as criminals when their only crime is searching for the American dream."

Kathryn Steinle was shot dead at San Francisco’s Pier 14 while out for an evening stroll with her father along the waterfront. Steinle Family

Trump has blamed the death of Steinle on San Francisco's policies, namely its status as a "sanctuary city," which provide safe havens for undocumented immigrants. Trump has said Steinle's murder was one of the reasons he believes the U.S. needed to tighten immigration laws and review sanctuary city designations.

At the White House on Wednesday, the president met with the victims of crimes perpetrated by undocumented immigrants.

"You lost people that you love because our government refused to enforce our nation's immigration laws and that's including the existing immigration laws," Trump told more than a dozen people gathered in the White House Cabinet Room.

However, there is scant evidence that undocumented immigrants commit more crime. According to a University of California analysis of federal data published by a liberal think tank, sanctuary cities appear to be safer than non-sanctuary cities and another analysis by political scientists found those cities do not see a surge in crime.

The No Sanctuary for Criminals Act, which passed 228-195, would deny federal grant money to cities that limit who they turn over to immigration enforcement officials or hold in their jails for federal authorities.

"Sanctuary policies endanger not only San Francisco or Nashville, but the entire U.S.," said Rep. Scott DesJarlais, R- Tenn.

It would also require jurisdictions to comply with immigration enforcement actions, specifically detainers, which Immigration and Customs Enforcement can request to hold suspected undocumented immigrants for 48 hours following an arrest for possible deportation.

Critics say the bills could hurt efforts of cities to get immigrants to cooperate with state and local law enforcement.

"It puts communities in peril," said Rep. Zoe Lofgren, D-Calif., before voting against the bill. "This bill is about telling communities how to police themselves."

Mayors of major U.S. cities have vowed to protect their respective immigrant populations from immigration enforcement, saying immigrants are key in working with local law enforcement to solve crimes.

Ali Noorani, the executive director of the National Immigration Forum, echoed those sentiments, saying both bills would "cultivate fear" if they become law and threaten the relationship immigrants have with law enforcement.

"Members of Congress should reject polarizing legislation that would obstruct the efforts of local law enforcement, waste resources and do nothing to keep us safer," Noorani said.