A Texas judge issued an injunction Saturday against a federal mandate aimed to protect transgender people, finding that the federal health rule violates existing law.

The preliminary injunction, granted by U.S. District Judge Reed O'Connor, is in response to a lawsuit filed by Texas, on behalf of religious hospital network Franciscan Alliance, and four other states in August.

In the suit, Texas and the other plaintiffs argued that a federal regulation prohibiting discrimination against transgender individuals in certain health programs would force doctors "to perform and provide insurance coverage for gender transitions and abortions, regardless of their contrary religious beliefs or medical judgment," according to the order. The plaintiffs also claim they could be required to perform gender transition procedures on children. Texas asked the court to block the federal government from enforcing the regulation.

Transgender rights activists have refuted claims that the health rule prevents doctors from using sound medical judgment, arguing instead that it clarifies that health care providers can't deny services or insurance to someone because that person is transgender.

In Saturday’s ruling against the federal government, the judge indicated that a preliminary injunction was appropriate because the federal health mandate violates the Administrative Procedure Act, which governs how federal agencies develop and issue regulations, and likely violates federal religious freedom protections for the plaintiffs that are private entities.

“While this lawsuit involves many issues of great importance—state sovereignty, expanded healthcare coverage, anti-discrimination protections, and medical judgment—ultimately, the question before the Court is whether Defendants exceeded their authority under the ACA in the challenged regulations’ interpretation of sex discrimination and whether the regulation violates the Religious Freedom Restoration Act as applied to Private Plaintiffs,” the order reads.

Under the health rule, federal protections against discrimination based on sex extend to gender identity. The rule applies to health care providers, including hospitals and doctors that accept federal dollars and insurance plans offered through the federal marketplace.

The health care providers and the state are claiming that the federal government is redefining the term "sex" to "thwart decades of settled precedent" and impose "massive new obligations" on health care providers.

O'Connor on Saturday agreed with the plaintiffs on this front, saying the federal government had "revised" discrimination based on sex.

The judge also ruled that the new rule "imposes a substantial burden" on private health care providers' religious exercise because it does not include a blanket exemption for religiously affiliated health care organizations.

Though the rule does indicate that those providers could claim exemptions under existing federal religious freedom laws, the judge sided with opponents in issuing the preliminary injunction, saying the private health care providers had "demonstrated a substantial likelihood of success" on their claim that the federal health rule still violates the federal Religious Freedom Restoration Act.

This is Texas' second recent high-profile win from O'Connor in recent months. The Fort Worth-based judge also sided with Texas in a separate case in August in which he blocked the Obama administration's guidelines saying schools must treat a student's gender identity as the student's sex to comply with with federal nondiscrimination statutes.

Read more: