On Wednesday—just two days before the law was scheduled to go into effect—U.S. District Judge Orlando Garcia granted an injunction against Senate Bill 4, the controversial immigration enforcement law that Governor Greg Abbott pushed as one of his top priorities in the 2017 legislative session.

Garcia’s ruling was broad in its scope, running 94 pages. Most of the law’s provisions were overturned, including many of its most controversial measures—rules that would punish local government officials who didn’t comply with federal immigration enforcement, and which mandated “enforcement assistance” of federal immigration law from local police. The ruling did leave intact a measure that allows police to inquire about immigration status in the course of investigating another crime. Garcia’s ruling notes that, while the law allows for police to ask, it doesn’t allow them to make detentions or arrests based on the information they receive—rather, they are able only to share that information with federal authorities.

The legal challenge to SB 4 was brought by Raul Reyes, the 34-year-old mayor of the small border town of El Cenizo. Reyes (who Leif Reigstad profiles in the latest issue of Texas Monthly) led the charge against the bill, which he feared would have had an immediate and dramatic impact on his city. “Leading up the ruling, I was filled with a lot of anxiety and nervousness,” Reyes said on Thursday morning. “The unknown is very hard to cope with. I never in my wildest dreams expected that me fighting this bill would lead to so much attention, because for me, this comes natural. I’m very proud of our legal team and the ruling, but it’s quite a bit to take in.”

After Reyes filed suit, his city was quickly joined by many of Texas’s largest cities: Austin, Houston, Dallas and San Antonio all joined, and ACLU lawyers joined the team arguing for the plaintiffs. Greg Casar—the Austin city council member who’s been one of the most vocal opponents of SB4 (he was arrested in May at Abbott’s office while participating in a sit-in against the law)—says that it’s important that the leadership in opposition to the law came from a border community of 3,400. “It was so important for El Cenizo to step out first and ignite a movement that expanded across all of Texas’s major metropolitan areas,” Casar told Texas Monthly. “It was critical to see El Cenizo move forward, because this isn’t just about Texas’s biggest cities.”

As it stands now, Garcia’s preliminary injunction will prevent SB 4’s enforcement. But that’s just the latest development in an ongoing battle. Both Abbott and Attorney General Ken Paxton have already signaled their intention to appeal the ruling, so it will likely go to the conservative United States Fifth Circuit Court of Appeals. A similar law, Arizona’s SB 1070, had its constitutionality challenged to the Supreme Court in 2012, where many of its provisions were overturned. After a settlement in the ongoing legal challenges in 2016, the law now mostly allows law enforcement to inquire about immigration status—the same part of SB4 that Garcia’s ruling allows. It’s too soon to know if that will end up being the ultimate fate of SB 4, too, but for Reyes, Casar, and others who joined the suit against it, what happened on Wednesday is reason to hope.

“This ruling sends a very clear message that, at the end of the day, we’re all human beings,” Reyes said. “I’m glad that the small town of El Cenizo, and myself in my capacity as mayor, were able to step up to the plate and do the right thing. That’s always worth fighting for—and I feel that now, with this, many families across our state will be able to sleep more comfortably at night.”