AUSTIN, Texas (AP) – A federal appeals court has upheld the bulk of a Texas law targeting "sanctuary cities" that is backed by the Trump administration as part of a crackdown on illegal immigration.

The ruling Tuesday by a three-judge panel of the 5th U.S. Circuit Court of Appeals in New Orleans allows Texas to enforce what critics call the toughest state-level immigration measure in the country.

The law allows police officers to ask people during routine stops whether they're in the U.S. legally and threatens sheriffs with jail time for not cooperating with federal immigration authorities.

Republican Texas Attorney General Ken Paxton applauded the ruling with a statement saying "dangerous criminals shouldn't be allowed back into our communities" to possibly commit more crimes.

“While I’m deeply disappointed by the Fifth Circuit’s decision, San Antonio will remain a welcoming and compassionate city as we continue to honor the law, including individual civil rights,” San Antonio Mayor Ron Nirenberg said.

“There is no impact to the City’s operations and we expect to maintain the current level of cooperation and coordination with federal authorities. The City of San Antonio continues to be in compliance with the applicable SB4 restrictions," city attorney Andy Segovia said in a statement.

In a news release, the city of San Antonio said it will work with its co-plaintiffs and outside counsel to evaluate the next steps to take.