A federal judge on Monday blocked the Trump administration's plan to eliminate transgender protections in the Affordable Care Act (ACA), also known as Obamacare.

The Department of Health and Human Services (HHS) rule change was set to take effect on Tuesday.

(Related: Biden criticizes Trump's rollback of transgender protections in health care.)

HHS's rule reverses an Obama-era regulation that expanded the definition of sex as it relates to discrimination in health care to include gender identity. HHS's new rule defines sex as “determined by biology.”

In his decision, U.S. District Judge Frederic Block cited the Supreme Court's recent landmark decision in Bostock v. Clayton. The high court in Bostock found that sex discrimination as it relates to workplace protections applies to sexual orientation and gender identity. Bostock expanded the definition of sex in federal laws to include people who identify as LGBT.

“The Court reiterates the same practical concern it raised at oral arguments when the Supreme Court announced a major decision, it seems a sensible thing to pause and reflect on the decision's impact,” Block wrote. “Since HHS has been unwilling to take that path voluntarily, the Court now imposes it.”

The lawsuit, Walker v. Azar, was filed in June by the Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, and the BakerHostetler law firm. Plaintiffs in the case are two transgender women of color: Tanya Asapansa-Johnson Walker and Cecilia Gentil. Both women said they have experienced discrimination in the health care system.

“We are pleased the court recognized this irrational rule for what it is: discrimination, plain and simple,” HRC President Alphonso David said in a statement. “LGBTQ Americans deserve the health care that they need without fear of mistreatment, harassment, or humiliation.”

Lambda Legal filed a separate lawsuit challenging the rule change on June 22. A decision is pending.