The Supreme Court affirmed a Trump administration policy on Wednesday which allows employers to restrict access to birth control on moral or religious grounds.

In the 7-2 vote, with Justices Ruth Bader Ginsburg and Sonia Sotomayor dissenting, about 70,000-126,000 women could lose contraceptive coverage from their employer, according to government estimates.

After signing the Affordable Care Act, former President Barack Obama required employers and insurers to offer no-cost coverage for all methods of contraception approved by the Food and Drug Administration.

Although religious institutions were exempt from the requirement, religious-affiliated organizations including hospitals and schools were not.

In Little Sisters of the Poor v. Pennsylvania, the court sided with the Trump administration’s rationale that contraception coverage poses a “substantial burden” on religious freedom.

The new ruling also permits employers “with sincerely held moral convictions opposed to coverage of some or all contraceptive or sterilization methods” to deny contraception coverage.

“By its terms, the ACA leaves the Guidelines’ content to the exclusive discretion of [Health Resources and Services Administration],” Justice Clarence Thomas wrote in the majority opinion, joined by Chief Justice John Roberts and Justices Samuel Alito, Brett Kavanaugh and Neil Gorsuch. “Under a plain reading of the statute, then, we conclude that the ACA gives HRSA broad discretion to define preventive care and screenings and to create the religious and moral exemptions.”

Alito filed a concurring opinion which Gorsuch joined, and Justice Elena Kagan filed a concurring opinion which Justice Stephen Breyer joined.

Pennsylvania and New Jersey challenged the administration’s policy, arguing that the states would have to pay for women who could not obtain contraception coverage from their employer.

Last year, the United States Court of Appeals for the Third Circuit blocked the rules, saying that poor women would disproportionately be affected by the policy.

“Cost is a significant barrier to contraceptive use and access,”  Judge Patty Shwartz wrote for the three-judge panel. “The most effective forms of contraceptives are the most expensive. After the A.C.A. removed cost barriers, women switched to the more effective and expensive methods of contraception.”

In her dissent, Ginsburg sided with the appeals panel writing that “this Court leaves women workers to fend for themselves, to seek contraceptive coverage from sources other than their employer’s insurer, and, absent another available source of funding, to pay for contraceptive services out of their own pockets.”

The ruling caused immediate blowback from Democrats and reproductive rights activists.

“Birth control is health care and health care is a human right,” Rep. Joe Kennedy (D-Massachusetts) tweeted Wednesday. “We will not allow this ruling to stand.”

Rep. Ilhan Omar (D-Minnesota) criticized the decision, saying that “today’s disastrous SCOTUS decision means that your employer or university can deny you birth control based on religious or moral objections.”

She added that she is grateful to have Planned Parenthood’s support “as we fight back for reproductive justice.”

Sen. Tammy Duckworth (D-Illinois) called birth control “basic healthcare.”

“[T]hus ruling will put medically-necessary contraceptives out of reach for countless women,” she tweeted. “Healthcare decisions should be a made between patients & their doctors—not the religious beliefs of employers.”

Four House Democrats plan to file the Protect Access to Birth Control Act on Thursday, which would appeal the Trump administration policy of permitting employers to opt out of the contraception mandate under the ACA due to moral or religious objections.

“A decision about whether to use birth control is one that should be between a patient and their doctor—and no one else,” the group, led by Rep. Barbara Lee (D-California) said in a statement. “Giving an employer the ability to interject themselves in that decisions—by limiting a patient’s access to free birth control—is unconscionable.”

Lee is joined by Reps. Diana DeGette (D-Colorada), Judy Chu (D-California) and Lois Frankel (D-Florida).

“We aren’t going to sit back and allow this court, or this administration, to put the health and well-being of millions of Americans at risk,” the four lawmakers wrote. “We are going to continue to fight against these dangerous rules in any way we can.”

Even if passed by the Democrat-led Congress, it is unlikely that such a measure directly contradicting the Trump administration would make it through the GOP-held Senate.