The Texas Legislature on Wednesday passed a ban on so-called "sanctuary cities" that allows police officers to ask about a person's immigration status and threatens sheriffs and police chiefs with jail time if they don't work with federal authorities.
Republican Gov. Greg Abbott has pledged to sign the bill into law, which could now come quickly.
The GOP-led Senate passed the bill Wednesday despite objections from Democrats, who call the bill a "show-me-your-papers" measure that will be used to discriminate against Latinos.
The term "sanctuary cities" has no legal definition, but Republicans want local police to help federal immigration agents crack down on criminal suspects in the U.S. illegally.
The bill allows the state to withhold funding from local governments for acting as sanctuary cities.
Republicans have a strong majority in the Legislature and shoved aside Democratic objections to push the bill, even as President Donald Trump's efforts to withhold federal funding for sanctuary cities have hit roadblocks in federal courts.
The Texas bill allows police to inquire about the immigration status of anyone they detain, a situation that can range from arrest for a crime to being stopped for a traffic violation. It also requires local officials to comply with federal requests to hold criminal suspects for possible deportation.
Texas doesn't currently have any sanctuary cities, but that hasn't stopped Abbott and Republican legislative leaders from pushing aggressively to ban them.
Sally Hernandez, the sheriff of Travis County, which includes liberal Austin, enraged conservatives by refusing to honor federal detainer requests if the suspects weren't arrested for immigration offenses or serious crimes such as murder. Hernandez softened her policy after Abbott cut funding to the county, saying decisions would be made on a case-by-case basis. She has said she will conform to the state's ban if it becomes law.
Fierce resistance has come from Texas Democrats and immigrants' rights organizations, as well as from some in law enforcement and top business lobbies. Opponents say it opens the door to discrimination and intimidation. Many sheriffs and police chiefs in heavily Democratic areas warn that it would make their jobs harder if immigrant communities -- including crime victims and witnesses -- become afraid of the police.