A federal judge in Texas on Saturday blocked enforcement of an Affordable Care Act (ACA) rule that prohibits discrimination against transgender people and women who have had abortions.

U.S. District Judge Reed O'Connor sided with plaintiffs – a group of states led by Texas and a handful of religiously affiliated non-profit medical groups – challenging the ACA's sex nondiscrimination requirement.

The Health and Human Services (HHS) regulation was scheduled to go into effect on Sunday, January 1. It “forbids discrimination on the basis of 'gender identity' and 'termination of pregnancy'” under Obamacare, wrote O'Connor in his 46-page ruling.

The rule, O'Connor wrote, violates the Administrative Procedure Act “by contradicting existing law and exceeding statutory authority” and likely violates the Religious Freedom Restoration Act (RFRA).

“Plaintiffs claim the Rule's interpretation of sex discrimination pressures doctors to deliver healthcare in a manner that violates their religious freedom and thwarts their independent medical judgment and will require burdensome changes to their health insurance plans on January 1, 2017,” O'Connor wrote.

White House spokesperson Katie Hill called the decision a “setback.”

“Today's decision is a setback,” Hill told BuzzFeed News, “but hopefully a temporary one, since all Americans – regardless of their sex, gender identity or sexual orientation – should have access to quality, affordable health care free from discrimination.”

O'Connor, an appointee of George W. Bush, has a history of anti-LGBT rulings, including an injunction against guidance issued by the Obama administration advising school districts to allow transgender students to use the bathroom of their choice and a ruling against married gay couples receiving benefits under the Family Medical Leave Act which was eventually reversed.