U.S. District Court for the Northern District of Texas Judge Reed O’Connor issued a preliminary injunction Saturday, blocking the federal government from enforcing an Obama administration regulation which“forbids discriminating on the basis of ‘gender identity’ and ‘termination of pregnancy’” under Obamacare. The regulation would have taken effect on January 1.

The lawsuit was brought by Texas and other states, and some religiously affiliated nonprofit medical groups.

The Plaintiffs claimed the regulation’s interpretation of sex discrimination pressures doctors to deliver healthcare in a manner that violates their religious freedom, thwarts their independent medical judgment and will require burdensome changes to their health insurance plans on January 1, 2017. They also argued that the regulation violates the Administrative Procedure Act (APA) — which sets the rules for federal government rule-making — and the Religious Freedom Restoration Act (RFRA).

Judge Reed O’Connor sided with the plaintiffs who argued that the administration’s rule violated religious freedom. In his decision, Judge O’Connor argued that the plaintiffs had shown that the regulation would harm them, and that the Obama administration lacked a basis for its definition of gender identity:

The government’s usage of the term sex in the years since Title IX’s enactment bolsters the conclusion that its common meaning in 1972 and 2010 referred to the binary, biological differences between males and females. Prior to the passage of the ACA in 2010 and for more than forty years after the passage of Title IX in 1972, no federal court or agency had concluded sex should be defined to include gender identity.

While the Affordable Care Act did not include expansive language about gender identity, the administration has, since 2013, issued a series of rulings making it easier for transgender Americans to use government services in accordance with that identity.

Because Title IX is referenced as providing the interpretation of Obamacare’s sex discrimination ban, O’Connor found that Obama administration’s expanded definition of sex discrimination exceeds the [Title IX] grounds provided for in the ACA, making that provision contrary to law and a violation of the APA.

Judge O’Connor also found that the regulation’s failure to include the religious exemptions found in Title IX “renders it contrary to law.” In addition the judge found a “substantial likelihood” that the plaintiffs would succeed in their religious freedom claim because “numerous” other options were available to the government for “expand[ing] access to transition and abortion procedures,” the rule is not the “least restrictive means” of advancing that interest — as required by the RFRA.

The decision can be read here.