The ruling could cause tens of thousands of people to lose birth control coverage in one year.

In the fight between those who support religious freedom and those who believe people should have equal access to basic health care, the U.S. Supreme Court delivered a decision Wednesday that dealt a huge blow to reproductive rights.

In a 7-2 decision, the Court ruled that employers and schools could decide to opt out of covering birth control in their health insurance plans as required by the Affordable Care Act.

According to the much-awaited decision in Trump v. Pennsylvania (consolidated with Little Sisters of the Poor Saints Peter and Paul Home v. Pennsylvania), the administration acted properly when it made the change to allow employers who cite religious or moral objections to opt out of providing no-cost birth control to women. Lower courts had previously blocked the rules.

“We hold today that the Departments had the statutory authority to craft that exemption, as well as the contemporaneously issued moral exemption. We further hold that the rules promulgating these exemptions are free from procedural defects,” Justice Clarence Thomas wrote for a majority of the court.

The government had estimated that the rule changes would cause about 70,000 women, and at most 126,000 women, to lose contraception coverage in one year.

Justice Ruth Bader Ginsburg cited those numbers in dissenting.

“In accommodating claims of religious freedom, this Court has taken a balanced approach, one that does not allow the religious beliefs of some to overwhelm the rights and interests of others who do not share those beliefs. Today, for the first time, the Court casts totally aside countervailing rights and interests in its zeal to secure religious rights to the nth degree,” she wrote.

Reproductive rights advocates lambasted the decision on Twitter.

Because of the ACA mandate, 61 million women are able to get their birth control without paying out of pocket, according to the National Women’s Law Center (NWLC). According to one study, women save a collective $1.4 billion a year in out-of-pocket savings on the pill alone. 

The Associated Press contributed to this report.