FILE - In this June 26, 2017, file photo, Lydia Balderas, left, and Merced Leyua, right, join others as they protest against a new sanctuary cities bill outside the federal courthouse in San Antonio. A federal judge late Wednesday, Aug. 30, temporarily blocked most of Texas’ tough new “sanctuary cities” law that would have let police officers ask people during routine stops whether they’re in the U.S. legally and threatened sheriffs will jail time for not cooperating with federal immigration authorities. The law, known as Senate Bill 4, had been cheered by President Donald Trump’s administration and was set to take effect Friday. (AP Photo/Eric Gay, File)

FILE - In this June 26, 2017, file photo, Lydia Balderas, left, and Merced Leyua, right, join others as they protest against a new sanctuary cities bill outside the federal courthouse in San Antonio. A federal judge late Wednesday, Aug. 30, temporarily blocked most of Texas’ tough new “sanctuary cities” law that would have let police officers ask people during routine stops whether they’re in the U.S. legally and threatened sheriffs will jail time for not cooperating with federal immigration authorities. The law, known as Senate Bill 4, had been cheered by President Donald Trump’s administration and was set to take effect Friday. (AP Photo/Eric Gay, File)

AUSTIN, Texas (AP) — A federal judge late Wednesday temporarily blocked most of Texas’ tough new “sanctuary cities” law that would have let police officers ask people during routine stops whether they’re in the U.S. legally and threatened sheriffs with jail time for not cooperating with federal immigration authorities.

The law, known as Senate Bill 4, had been cheered by President Donald Trump’s administration and was set to take effect Friday. It was widely viewed as the toughest immigration measure in the nation since Arizona passed what critics called a “Show Me Your Papers” law in 2010, which was later partially struck down by the U.S. Supreme Court.

ADVERTISEMENT

The ruling by U.S. District Judge Orlando Garcia in San Antonio was handed down as anxieties about immigration enforcement in Texas have again flared in the wake of Tropical Storm Harvey. Houston officials have sought to assure families fleeing the rising floodwaters in the nation’s fourth-largest city that shelters would not ask for their immigration status.

Houston police Chief Art Acevedo, an outspoken critic of the law, got word of the decision while standing inside a downtown convention center where about 10,000 people have sought shelter. He high-fived another officer.

“We needed a break. That’s a break for us,” said Acevedo, whose department has conducted thousands of high-water rescues and lost one officer who died in floodwaters as he tried to drive to work.

The measure sailed through the Republican-controlled Legislature despite months of protests and opposition from business groups, which worried that it could cause a labor-force shortage and send a negative economic message. Leading the lawsuit were Texas’ largest cities — including Houston, Dallas, San Antonio and Austin — in a state where the Hispanic population has grown at a pace three times that of whites since 2010.

Garcia wrote in his 94-page ruling that Texas’ law was pre-empted by existing federal statute and therefore unconstitutional.

The judge noted that when it was being considered in public legislative hearings, only eight people testified in favor of it while 1,600 “showed up to oppose it.” He also wrote there “is overwhelming evidence by local officials, including local law enforcement, that SB 4 will erode public trust and make many communities and neighborhoods less safe” while adding that “localities will suffer adverse economic consequences which, in turn, will harm the state of Texas.”

ADVERTISEMENT

“The court cannot and does not second guess the Legislature,” Garcia wrote. “However, the state may not exercise its authority in a manner that violates the United States Constitution.”

Garcia’s order suspends the law’s most contentious language while suggesting that even parts of the law that can go forward won’t withstand further legal challenges.

Republican Gov. Greg Abbott, who signed the law in May, said Texas would appeal immediately and expressed confidence that the state would eventually prevail. He also again took a swipe at the elected Democratic sheriff of Travis County, Sally Hernandez, who had announced on the day of Trump’s inauguration that her Austin jails would no longer automatically honor all detainer requests made by U.S. Immigrations and Customs Enforcement.

“Today’s decision makes Texas’ communities less safe. Because of this ruling, gang members and dangerous criminals, like those who have been released by the Travis County Sheriff, will be set free to prey upon our communities,” Abbott said in a statement.

The U.S. Department of Justice, which has made “sanctuary cities” a new priority under the Trump administration, had joined Texas is defending the law in court. U.S. Attorney General Jeff Sessions has threatened to pull federal money from jurisdictions that hinder communication between local police and immigration authorities and has praised Texas’ law.

The law had sought to fine law enforcement authorities who fail to honor federal requests to hold people jailed on offenses that aren’t immigration related for possible deportation. It also would have ensured that police chiefs, sheriffs and constables could face removal from office and even criminal charges for failing to comply with such federal “detainer” requests.

Opponents of the law told Garcia that his ruling could determine if other states pursue copycat measures, while the Texas attorney general’s office argued that the new law had fewer teeth than the Arizona measure.

Since January, the bill has elevated political tensions in Texas, and it boiled over in May when Republican state Rep. Matt Rinaldi told Democrats that he had called federal immigration agents to report protesters in the Capitol who he said were holding signs that said they were not legal citizens. A Democrat whose district is near the U.S.-Mexico border admitted confronting and pushing Rinaldi, who has acknowledged telling him that he would “shoot him in self-defense.”

___

Associated Press Writer Nomaan Merchant in Houston contributed to this report.

___

Follow Paul J. Weber on Twitter: www.twitter.com/pauljweber