SAN ANTONIO, Texas – Before the ink finished drying on Texas Governor Greg Abbott’s signature, Senate Bill 4 faced stiff legal opposition.

“SB4 was challenged immediately after it was passed and the district court, the lower court at the federal level, initially halted almost all of the law,” said University of Texas law professor Denise Gilman.

The law seeks to punish local governments and law enforcement that don't fully enforce federal immigration law. Both Austin and San Antonio said the new law will make their cities less safe by discouraging crime victims who are undocumented from reporting to police.

RELATED: Austin joins San Antonio in SB4 lawsuit against Texas

After the law was stopped in the lower court, the state of Texas immediately appealed to a three-judge panel on the Fifth Circuit Court of Appeals. That panel handed out a decision which allowed the law to go into effect with an exception.

“Publicly elected officials were prohibited from endorsing policies that limited the enforcement of immigration laws which could have potentially resulted in fines or jail time for elected officials,” said attorney Kate Lincoln-Goldfinch.

The lower court in San Antonio stopped that part of the law and the Fifth Circuit agreed.

“The Fifth Circuit held the injunction—or basically continued to stop that portion of the law,” said Lincoln-Goldfinch.

“In the meantime, most portions of the law are in effect at this time,” said Gilman.

Whether SB4 is constitutional has not yet been decided. That is still held up in lower court.

“There are some initial things that are happening but right now the fight is just around ‘Will the law be allowed to go into effect while we’re considering it’s ultimate constitutionality,’” said Gilman.

It is a procedural entanglement with no sign of ending.

“We still have the main case pending in the district court with Judge Orlando Garcia in San Antonio and so depending on what the Fifth Circuit decides on the injunction that will guide what issues remain to be resolved at the district court,” said Lincoln-Goldfinch.

Last year, a federal judge blocked an executive order signed by President Trump, which would have blocked federal grants from going to so-called Sanctuary Cities.