(TEXAS TRIBUNE) A panel of three U.S. 5th Circuit Court of Appeals judges ruled Tuesday that most of the state’s immigration enforcement legislation, Senate Bill 4, can remain in effect while the case plays out, handing a victory to Gov. Greg Abbott and Republican supporters of the legislation.

As passed, Senate Bill 4 allows local law enforcement officers to question the immigration status of people they detain or arrest and punishes local government department heads and elected officials who don’t cooperate with federal immigration "detainers" — requests by agents to turn over immigrants subject to possible deportation — in the form of jail time and penalties that exceed $25,000.

The one part of SB 4 that is still on hold is a provision that punishes local officials from “adopting, enforcing or endorsing” policies that specifically prohibit or limit enforcement of immigration laws. The judges kept that injunction in place, but said it only applies to the word “endorse.” The bill, as passed and signed, would have made elected and appointed officials subject to a fine, jail time and possible removal from office for violating all or parts of the legislation.

The law, one of the most controversial in recent Texas Legislature history, came after Abbott declared the legislation a priority item early during last year’s 85th legislative session. After the governor signed the bill during a Facebook Live in May, the city of El Cenizo and Maverick County sued to stop the law and was joined by several local governments, including the cities of Houston, Austin and San Antonio, as well as El Paso County. The Mexican American Legal Defense and Educational Fund, or MALDEF, and the American Civil Liberties Union represented several of the clients.

In August, U.S. District Judge Orlando Garcia halted several parts of the bill, including the provision that requires jail officials to honor the detainer provision. He also blocked sections that prohibit local entities from pursuing “a pattern or practice that 'materially limits' the enforcement of immigration laws” and another that prohibits “assisting or cooperating” with federal immigration officers as reasonable or necessary.

But he did not halt the part of the bill that says police chiefs, sheriffs and other department heads cannot forbid officers from questioning a person’s immigration status, which means that Texas has been what opponents of the measure call a “papers please” state since the law took effect.

A separate panel of judges ruled in September that the detainer provision could stand until a final determination was made. The panel also stated that law enforcement officers, including campus police, with “authority that may impact immigration” cannot be prevented from assisting federal immigration officers. In their decision on Tuesday, the judges recommended the case go back to the district court level “with instructions to dismiss the vacated injunction provisions.”

After Tuesday's ruling was announced, Abbott updated his followers on Twitter, highlighting that claims the bill would lead to racial profiling were rejected.

"Texas Ban on Sanctuary City Policies upheld by Federal Court of Appeals," he tweeted. "Allegations of discrimination were rejected. Law is in effect."

Texas Attorney General Ken Paxton also praised the ruling, saying in a statement that SB 4 is constitutional and protects the safety of law enforcement officers and all Texans.

“Enforcing immigration law prevents the release of individuals from custody who have been charged with serious crimes," he said. Dangerous criminals shouldn’t be allowed back into our communities to possibly commit more crimes.”

Go here to see this story as it appears on The Texas Tribune.