A federal judge in Texas has ordered a court order barring anti-discrimination protections under the Affordable Care Act to transgender health and abortion related services.

According to District Judge Reed O’Connor, the rule defines sex bias to include “discrimination on the basis of gender identity and termination of pregnancy.”

He also said it violated the Administrative Procedure Act, which governs rule-making.

O’Connor made the ruling just a day before the new policy was intended to take effect.

The ruling came after the plaintiffs, made up of Texas, seven other states and three Christian healthcare groups challenged the new laws.

The groups said the law would force Catholic hospitals and doctors to perform gender reassignment services, which is against their faith.

They argued that the new regulation would “require them to perform and provide insurance coverage for gender transitions and abortions, regardless of their contrary religious beliefs or medical judgment.”

The judge ruled that plaintiffs were likely to prevail in court on their claim that the new policy infringes on the rights of private healthcare providers under the Religious Freedom Restoration Act.

White House spokeswoman Katie Hill debunked the injunction.

“Today’s decision is a setback, but hopefully a temporary one, since all Americans – regardless of their sex or sexual orientation – should have access to quality, affordable health care free from discrimination,” she said.

Earlier this year the judge ruled that a separate policy, which would require public schools to allow trans students to use the bathroom of their choice, should also be thrown out.