Federal appeals court upholds most of Texas law banning sanctuary cities
© Getty Images

A federal appeals court ruled Tuesday that most of Texas’ law targeting so-called “sanctuary cities” can remain in effect, a win for Republicans in the state as well as for the Trump administration as it battles measures viewed as protecting undocumented immigrants.

The ruling from a three-judge panel of the 5th Circuit U.S. Court of Appeals allows Texas to enforce measures outlined in Senate Bill 4, which lets local law enforcement officials ask the people they detain about their immigration status, according to The Associated Press.

The law also punishes local government officials who refuse to cooperate when federal immigration agents request that immigrants in custody be turned over to them.

The part of the law that the court said is still on hold concerns a provision that punishes local officials who “endorse” policies that restrain the enforcement of federal immigration laws.

The ruling is largely seen as a victory for Gov. Greg Abbott (R) and Republicans who support the legislation.

“I’m pleased the…