The White House has said that it will roll back a rule that banned discrimination against transgender people in health care.

The Affordable Care Act (ACA or “Obamacare”) banned hospitals, doctors, and insurance companies from discriminating on the basis of several categories, including sex, if they receive federal money. Most health care providers receive some form of federal funding.

Citing previous federal court rulings, a 2016 rule issued by the Department of Health and Human Services (HHS) said that the ban on sex discrimination in the ACA extended to discrimination based on gender stereotypes and discrimination against women who had had abortions and transgender people.

Now Donald Trump’s HHS is set to roll back that rule, saying that it interferes with health care providers’ “religious freedom” and that the ACA was never meant to protect transgender people’s rights.

“That is an excruciatingly narrow and legally incorrect definition of the term ‘sex’ that would jeopardize legal protections for lesbian, gay, bisexual and transgender people,” said Jennifer Pizer of Lambda Legal.

The change will make it harder for transgender people to access health care.

Before the rule was enacted, health insurers often refused to cover expenses related to transitioning, calling them “cosmetic” or “experimental.” The Obama Administration said that such policies were “outdated and not based on current standards of care.”

Several months later, a federal judge in Texas issued an injunction against the rule. “Plaintiffs will be forced to either violate their religious beliefs or maintain their current policies which seem to be in direct conflict with the Rule and risk the severe consequences of enforcement,” the judge wrote.

When Trump took office, the HHS told the Texas judge that it was planning to modify the rule.

“If the Trump administration rescinds the protections against sex stereotyping and gender identity discrimination, the effect will be potentially devastating not just for the trans community, but for any other patients who are gender-nonconforming, including lesbian and gay individuals,” said Jocelyn Samuels, who wrote the rule when Barack Obama was president.

The Obama Administration enacted a few rules based on the idea that discrimination against transgender people is sex discrimination. The Department of Education issued guidance that said that Title IX banned discrimination against transgender people, for example.

But the Trump Administration has worked to rescind those guidelines. Last February, the Department of Education rolled back protections for transgender students.

Earlier this year, the Trump Administration created an office in the HHS specifically to advocate for health care workers who say their religious freedom has been violated, and several religious organizations were behind the lawsuit against the Obama Administration’s transgender health care protections.