In a 7-2 decision, the U.S. Supreme Court on Wednesday upheld sweeping Trump administration exemptions to the Affordable Care Act’s birth control mandate that could imperil access to no-cost contraceptives for thousands of women.

Written by Justice Clarence Thomas, the majority opinion — in two consolidated cases, Little Sisters of the Poor v. Pennsylvania and Trump v. Pennsylvania — concludes that the exemptions were permissible, and that if birth control coverage is in trouble, it isn’t Trump’s fault. Instead, Thomas wrote, “it is Congress” that has “failed to provide the protection for contraceptive coverage.” Chief Justice John Roberts and Justices Samuel Alito, Neil Gorsuch, and Brett Kavanaugh joined Thomas’s opinion.

Women’s health advocates decried the decision as yet another chipping away at reproductive rights. “Contraception should not be singled out from the rest of health insurance coverage,” Lourdes Rivera, senior vice president of U.S. programs at the Center for Reproductive Rights, said in a statement. “Today’s ruling has given bosses the power to dictate how their employees can and cannot use their health insurance — allowing them to intrude into their employees’ private decisions based on whatever personal beliefs their employers happen to hold.”

At issue was a provision of the Affordable Care Act that for the first time created health care parity for women, who had long been charged higher insurance premiums while still having to pay substantial out-of-pocket fees for basic services, including contraceptives. The ACA guaranteed that a suite of women’s health services would be covered, and it directed the Health Resources and Services Administration, an agency of the Department of Health and Human Services, to develop the specific list, which ultimately included no-cost birth control.

Under the ACA’s birth control provisions, more than 61 million women received no-cost access to all Food and Drug Administration-approved contraceptives, a benefit that has saved women more than $1.4 billion per year. Access to birth control reduces the number of unintended pregnancies and encourages birth spacing, which leads to better outcomes for mothers and babies. Birth control promotes gender and racial equality and is linked to greater educational attainment and increased earnings for women.

Still, as soon as the ink dried on the provision, a number of religious organizations balked, saying that providing birth control coverage violated their religious freedom. The Obama administration had already guaranteed that churches would be exempt from having to provide coverage, and it subsequently devised a workaround for related organizations to opt out. Those groups would merely have to say that they objected, and insurers would provide the coverage directly to the affected employees. But some organizations, including the Little Sisters of the Poor, a Catholic order of nuns that runs nursing homes, said that wasn’t enough. They argued that having to signal their desire to deny coverage implicated them in a process that would ultimately lead to contraceptives being provided to their employees.

The dispute bounced around in the courts until the spring of 2017, when Trump announced that his administration would fix things, with a clear indication that the plan was to give the religious organizations exactly what they wanted. But ultimately, the administration went further, penning new rules that would allow nearly any employer — including publicly traded companies — to deny coverage based on religious grounds. The rules also created a carveout for employers to object for “moral” reasons, which encompasses pretty much anything.

At issue before the Supreme Court was whether the government had statutory authority to broadly expand conscience exemptions to the birth control mandate, how the Religious Freedom Restoration Act might be implicated, and whether the exemptions violated certain principles of the Administrative Procedures Act, which governs how agencies develop and issue regulations.

In the court’s majority opinion, Thomas wrote that there were no procedural defects that would render the new exemptions moot under the Administrative Procedures Act. More importantly, he wrote that the ACA itself did not specify which women’s services should be covered and instead gave the Health Resources and Services Administration “sweeping authority” to do so. “This means that HRSA has virtually unbridled discretion to decide what counts as preventive care and screenings,” he wrote. “This same capacious grant of authority … leaves its discretion equally unchecked in other areas” — including in deciding who is exempt from providing those services.

In other words, the controversy at issue was created by Congress, which did not specifically require birth control coverage under the ACA or constrain the agency’s power to tinker with coverage requirements. In a footnote, Thomas writes that the HRSA could exercise its discretion and yank birth control coverage altogether, “yet another indication of Congress’ failure to provide strong protections for contraceptive coverage.”

“The court casts totally aside countervailing rights and interests in its zeal to secure religious rights to the nth degree.”

In dissent, Justice Ruth Bader Ginsburg (joined by Justice Sonia Sotomayor) argues that this is nonsense. While the HRSA had “broad discretion to determine what preventive services insurers should provide for women,” she wrote, the ACA mandates that those services “shall” be covered.

“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,” Ginsburg wrote — such as employees who do not share the religious predilections of their employers. “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.”

Notably, Thomas’s majority opinion sidesteps the direct question of whether the Religious Freedom Restoration Act compelled the government to enact the sweeping exemptions.

RFRA prohibits the government from “substantially” burdening the free exercise of religion except where it can demonstrate that the burden is the “least restrictive means” of furthering “a compelling government interest.” The question of whether RFRA applies, and how, has been baked into the litigation of the ACA’s birth control mandate. The Obama administration determined that its accommodation — where an employer with religious convictions could opt out of coverage — fit the bill while maintaining important health services for women, while other groups, such as the Little Sisters, disagreed.

That brings us to the two concurring opinions in the case, one written by Alito (joined by Gorsuch) and the other written by Justice Elena Kagan (joined by Justice Stephen Breyer). Together they signal that there could be more litigation to come on the question of the contraceptive mandate and the power to exclude large swaths of employers.

Let’s consider Kagan’s first. While she and Breyer say they’re not entirely sure that the HRSA had the authority to decide who should be exempt from covering women’s health services, under court precedent they were compelled to endorse the government’s position — and thus join the majority decision. But the cases now move back to the lower court, which had blocked the exemptions from taking effect. There, Kagan wrote, the government’s actions may warrant additional scrutiny because there remains a question of whether the exemptions were reasoned or “arbitrary and capricious.”

“An agency acting within its sphere of delegated authority can of course flunk the test of ‘reasoned decision-making,’” she wrote. “The agency does so when it has not given ‘a satisfactory explanation for its action’ — when it has failed to draw a ‘rational connection’ between the problem it has and the solution it has chosen.”

The government’s attempts to solve the accommodation problem with sweeping exemptions “give every appearance of coming up short,” she wrote.

And this is precisely why Alito in his concurrence says that the court majority should have concluded that RFRA required the Trump administration’s coverage exemptions. The Obama accommodation didn’t serve the Little Sisters, he wrote. And he doubts the government has demonstrated a compelling interest in ensuring access to no-cost birth control. (If Congress thought it so compelling to make “free contraceptives” available, why didn’t it extend that benefit to “women who do not work outside the home,” he wrote.)

“If RFRA requires this exemption, the departments did not act in an arbitrary and capricious manner in granting in,” he wrote. The fact that the majority failed to make that finding, he added, “will prolong the legal battle in which the Little Sisters have now been engaged for seven years.”

The Little Sisters shouldn’t even be the face of this case. But they certainly offer more sympathetic optics for a decision to deny countless women access to contraceptives.

Both Thomas and Alito lean heavily into the idea that the prolonged legal fight for the right to deny their employees contraceptive coverage has imposed a nearly impossible burden on the Little Sisters. “For over 150 years, the Little Sisters have engaged in faithful service and sacrifice, motivated by a religious calling to surrender all for the sake of their brother,” Thomas wrote. “But for the past seven years they — like many other religious objectors who have participated in the litigation and rulemakings leading up to today’s decision — have had to fight for the ability to continue in their noble work without violating their sincerely held religious beliefs.”

But this isn’t exactly true. The Little Sisters were never required to provide birth control coverage to their employees because they are insured under a “church plan,” which was always exempt. And even if that weren’t the case, a permanent injunction in 2018 barred the government from ever enforcing the mandate against them. The nuns have worked to stay involved in the litigation even though they haven’t had any unresolved legal beef to settle.

In other words, the Little Sisters shouldn’t even be the face of this case. But they certainly offer more sympathetic optics for a decision to deny countless women access to contraceptives than the Trump administration or some corporation — like the craft-supply store Hobby Lobby or custom cabinet maker Conestoga Wood Specialties Corporation, which have also challenged the mandate as violating their religious beliefs.

Regardless, not everyone is waiting to see where the legal dispute may go from here. In response to the court’s decision, four members of Congress — Reps. Diana DeGette, Judy Chu, Barbara Lee, and Lois Frankel — announced Wednesday morning they would be filing legislation that would block the Trump exemptions from ever taking effect. “A decision about whether to use birth control is one that should be between a patient and their doctor,” the lawmakers said in a joint statement. “Giving an employer the ability to interject themselves in that decision — by limiting a patient’s access to free birth control — is unconscionable.”