Just two days before it was set to go into effect, Texas' new law banning provisions of "sanctuary cities" has been blocked by a federal court.

Wednesday afternoon, U.S. District Judge Orlando Garcia granted a preliminary injunction against Senate Bill 4. SB 4 was authored by State Senator Charles Perry (R- Lubbock) and it was set to go into effect on September 1.

SB 4 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.

According to the Texas Tribune, Judge Garcia halted part of the bill that, "required jail officials to honor all detainers", apparently in violation of the Fourth Amendment. A second part of the bill also included in the injunction was, “a pattern or practice that 'materially limits' the enforcement of immigration laws.”

Judge Garcia additionally wrote in his ruling, “If during a lawful detention or arrest an officer obtains information that a detained or arrested individual is undocumented he may not arrest the individual on this basis."

Texas Governor Greg Abbott spoke out against the ruling, “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.

“U.S. 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," said Governor Abbott.

Wednesday night, Texas Attorney General Ken Paxton said he will fight against the federal injunction.

“Senate Bill 4 was passed by the Texas Legislature to set a statewide policy of cooperation with federal immigration authorities enforcing our nation’s immigration laws,” Attorney General Paxton said. “Texas has the sovereign authority and responsibility to protect the safety and welfare of its citizens. We’re confident SB 4 will ultimately be upheld as constitutional and lawful.”

Attorney General Paxton asked to have the lawsuits against SB 4 consolidated and moved from U.S. District Judge Orlando Garcia’s court in San Antonio to Austin, “where the people’s representatives passed SB 4,” he said. “State business is conducted in Austin. The plaintiffs have no reason to litigate this case in San Antonio.”

More From KFMX FM