Two federal judges in two days struck down a proposed Trump administration rule that would have allowed health care workers to refuse care due to their “religious beliefs or moral convictions.” The rule — which critics said would have allowed providers to deny abortion care and care to LGBTQ patients — was set to take effect on Nov. 22.

On Wednesday, Judge Paul A. Engelmayer of the Southern District of New York said the rule was unconstitutionally coercive because it would let the Department of Health and Human Services withhold billions of dollars of funding from hospitals, clinics, universities and other health care providers that did not comply.

Then on Thursday, Judge Stanley A. Bastian of the Eastern District of Washington vacated the rule from the bench. According to Equality Case Files, a nonprofit that tracks LGBTQ-related litigation, when a Justice Department attorney argued that the rule would not permit discrimination but allow “refusal of some treatments,” Bastian pushed back, saying it was “discrimination by another name.”

When asked for a comment on this week’s decisions, an HHS spokesperson said existing laws already prevented health care workers from “being bullied” due to their beliefs.

These “conscience protection laws” apply to doctors and nurses who do not want to participate in abortion or assisted suicide because of their religious beliefs, the spokesperson said in an email.

The newly struck down 440-page rule, published by HHS in May, would have expanded the ability of doctors, nurses and other health care workers to refuse services on moral or religious grounds. The Protecting Statutory Conscience Rights in Health Care sought to revise existing HHS regulations to ensure “vigorous enforcement of federal conscience and anti-discrimination laws” and strengthen health care workers rights so they are “free from coercion or discrimination” on account of their “religious beliefs or moral convictions.”

New York Attorney General Letitia James, who led 23 cities and states in the New York suit, said the rule would have encouraged health care providers to "openly discriminate" against some patients.

"Health care is a basic right that should never be subject to political games," James said in a statement.

If it had gone into effect, the updated rule could have, for example, protected religious pharmacists who refused to fill hormone replacement or abortion medication prescriptions from discrimination complaints.

In the New York case, Engelmayer stated that part of his reasoning for striking down the rule was due to HHS overstating how many complaints it received about the 2011 Obama health care rule. HHS alleged in court that 358 complaints were lodged over the 2011 rule, when in actuality, just 21, “or a mere 6 percent of the 336 unique complaints” were in fact connected to the conscience rule.

“This conceded fact is fatal to HHS’s stated justification for the Rule,” Engelmayer wrote.

Before Engelmayer’s decision, a number of LGBTQ advocacy groups — like the National Center for Lesbian Rights, Callen Lorde Community Health Center, and the National LGBTQ Task Force — submitted amicus briefs in that case arguing against the rule.

These organizations, along with other LGBTQ and civil rights groups, applauded the judges' decisions this week.

Jamie Gliksberg, a senior attorney at Lambda Legal, said the decisions have “likely saved countless lives.”

“Two judges in two days have recognized the Denial of Care Rule for what it is, an egregious and unconstitutional attack on women, LGBT people and other vulnerable populations,” Gliksberg said in a statement. “The Denial of Care Rule targets some of our most marginalized and vulnerable communities and deserves to be relegated to the dustbin of history.”

Alexa Kolbi-Molinas, a senior staff attorney with the ACLU’s Reproductive Freedom Project, said, “Everyone is entitled to their religious beliefs, but religious beliefs do not include a license to discriminate, to deny essential care, or to cause harm to others.”

Follow NBC Out on Twitter, Facebook & Instagram