An El Paso judge on Tuesday denied Texas’ efforts to shut down a migrant shelter network that Attorney General Ken Paxton claimed was violating state law by helping people he suspected of being undocumented immigrants.

Although the case centered around immigration, it was one of more than a dozen instances ProPublica and The Texas Tribune recently identified in which Paxton’s office has aggressively used the state’s powerful consumer protection laws to investigate organizations whose work conflicts in some way with his political views or the views of his conservative base.

Two weeks ago, lawyers for the Texas attorney general’s office argued to state District Judge Francisco Dominguez that El Paso-based Annunciation House should be closed, accusing the 46-year-old nonprofit of violating laws prohibiting human smuggling and operating a stash house.

Dominguez ruled on Tuesday that the state’s claim, “even if accepted as true, does not establish a violation of those provisions,” according to the order. He ruled that the state laws are preempted by federal law and “unenforceable.”

Paxton’s office did not respond to a request for comment on the ruling.

“The volunteers of Annunciation House have a lot of work to do, and they just continue to do it. They can just do it more at peace today than they did yesterday,” said Jerry Wesevich of Texas RioGrande Legal Aid, who represents the shelter network. “There is some relief at knowing that the court agreed with their view of the law.”

Paxton’s office initially sought records from Annunciation House about the shelter’s clients in February. Officials from the attorney general’s Consumer Protection Division showed up on the nonprofit’s doorstep, demanding to come inside and search its records, including all logs identifying immigrants who received services there going back more than two years.

Consumer protection laws give attorneys general broad legal authority to request a wide range of records when investigating businesses or charities for allegations of deceptive or fraudulent practices. Attorneys general like Paxton, however, have increasingly used their powers to also pursue more political investigations, experts told the news organizations.

The attorney general’s office previously confirmed to the news organizations that no consumer complaints had been filed against Annunciation House. Complaints aren’t required to launch an investigation.

In the case of Annunciation House, the attorney general gave the shelter director, Ruben Garcia, one day to turn over the documents. The news organizations found this to be an unusual practice: ProPublica and the Tribune identified several other cases in which the Consumer Protection Division sent its requests for records by mail and gave organizations weeks to respond.

Garcia’s lawyer told the state its deadline did not give the shelter enough time and asked a judge to determine which documents shelter officials were legally allowed to release. Interpreting that as noncompliance, Paxton’s office filed a countersuit to shutter the shelter network.

Wesevich and another lawyer representing an organization Paxton’s office investigated using the consumer protection law said they believe he launched the investigations to harass their clients and to cause a chilling effect among organizations doing similar work. Both said the attorney general’s demands violate the First Amendment, which guarantees the right to free speech, association and religion, and the Fourth Amendment, which offers protection against unreasonable search and seizure.

In his ruling on Tuesday, Dominguez said that Paxton’s “predetermined efforts” to shut down the nonprofit were “substantially motivated by his retaliation against Annunciation House’s exercise of its First Amendment right to expressive association.” He also said the investigative document the state agency gave to Annunciation House, demanding access to the nonprofit’s records, violated the Fourth Amendment.

Annunciation House opened its first shelter at a Catholic church nearly 50 years ago. The nonprofit primarily serves people who are processed and released into the U.S. by immigration officials. Garcia communicates regularly with Border Patrol and other federal agencies that ask for help finding shelter for people who turn themselves in to authorities or are apprehended but have nowhere to go while their cases are processed.

Paxton’s decision to sue Annunciation House came against the backdrop of a yearslong effort by right-wing Christian groups and figures to paint immigrants as part of a Democratic plot to undermine American Christianity — despite a large percentage of migrants being Christian.

Texas Lt. Gov. Dan Patrick, a Republican, echoed those claims in a speech at the Republican Party of Texas’ convention in May, telling delegates that immigrants were part of a plan by the “Marxist, socialist left” to “take God out of the country.” At the same convention, Paxton’s wife, state Sen. Angela Paxton, also claimed that Republicans were in the middle of a battle “against spiritual forces of evil in the heavenly realms.”

Far-right Catholics have mobilized against groups such as Catholic Charities, branding it an “enemy of the people” and calling for the defunding of bishops who assist migrants. In a 2022 interview with the right-wing group Church Militant, U.S. Rep. Marjorie Taylor Greene, R-Ga., claimed that Catholic Charities’ work was proof of “Satan controlling the church.”