judge gavel
© West Coast Surfer / Global Look Press
A US district judge has blocked enforcement of major parts of a Texas "sanctuary cities" law, two days before it was set to be enforced. Republican Governor Gregg Abbott says the state will appeal the decision to the Supreme Court if necessary.

US District Judge Orlando Garcia ruled Wednesday evening that Texas Senate Bill 4, which requires local law enforcement to assist federal immigration agents, "will erode public trust and make many communities and neighborhoods less safe," the Dallas Morning News reported.

The Republican-backed law was scheduled to be enforced starting Friday, September 1.

The 94-page ruling also specifically blocked a provision that prevented local law enforcement departments from enacting policies that "materially limit" federal enforcement of immigration laws.

The court order partially leaves in place SB 4's provision allowing police to inquire upon a detainee's immigration status. The ruling restricts what police can do afterward, however. They must only share that information with federal authorities.

"In sum, SB 4 gives local officers discretion to inquire and share information but it does not provide them with discretion to act upon the information that they may obtain," the judge wrote.

"Because of this ruling," Texas Governor Gregg Abbot wrote in response, "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."

"US Supreme Court precedent for laws similar to Texas' law are firmly on our side. This decision will be appealed immediately and I am confident Texas' law will be found constitutional and ultimately be upheld," he added.

Bringing the case to court were Texas' biggest cities led by Democrats and civil rights organizations, including the League of United Latin American Citizens.

"It's a win for the country," said Roger Rocha, the league's president, the Morning News reported. "The ruling protects the civil liberties of immigrant communities across the U.S. that live in fear of discrimination due to the color of their skin, accent, and native country. We prevailed in blocking state lawmakers from rolling back decades of progress our nation has made on civil rights."