The religious owners of closely held businesses don’t have to comply with the Obamacare mandate to provide employees with free birth control, according to a Supreme Court decision on Monday in the Hobby Lobby case.

In a narrow 5-4 ruling, the high court majority limited its decision only to the contraceptive mandate in the Affordable Care Act and emphasized that the case should not be understood to mean that all insurance mandates fail if they violate an employer’s religious beliefs. The decision, one of the most anticipated this term, clarifies how much flexibility owners of closely held, for-profit entities have in exercising religious beliefs. It also does not provide a mechanism for employers who might claim religious discrimination as a cloak for illegal discrimination against employees through health coverage.

Today’s decision stems from separate appeals filed by the Green family, owners of the national chain of Hobby Lobby craft stores based in Oklahoma City, and by the Mennonite owners of Conestoga Wood Specialties in East Earl, Pa. Both companies sued the Obama administration over the contraception requirement, arguing that it violated their religious beliefs under the Religious Freedom Restoration Act.

Regulations issued under the Obamacare law require companies of a certain size to provide female employees with insurance that includes free access to 20 forms of birth control. Hobby Lobby and Conestoga offered health plans that cover most forms of contraception but exclude forms of birth control that the owners believe can cause abortions. To provide those contraceptives, the companies argued, would make the religious owners complicit in abortion. Under the law, companies that refuse to comply could be fined more than $1 million daily.

The Supreme Court majority made it clear Monday’s ruling would not assess the Religious Freedom Restoration Act’s “applicability to publicly traded corporations. … The companies in the cases before us are closely held corporations each owned and controlled by members of a single family and no one has disputed the sincerity of their religious beliefs.” The ruling marked the high court’s second major case on a challenge arising out of the Affordable Care Act. The 5-4 verdict came with a majority opinion issued by Justice Samuel Alito; Justices Ruth Bader Ginsburg, Sonia Sotomayor, Elena Kagan, and Stephen Breyer dissented.

The Obama administration had argued that a broad decision in favor of the companies may have a sweeping effect on health insurance coverage, leading to religious challenges to do-not-resuscitate orders and vaccine coverage. The contraceptive requirement, the Obama team claimed, is “lawful and essential to women’s health.”

Justice Anthony Kennedy joined Alito’s majority opinion and wrote his own, noting that a mechanism is “already in place” in this case so that the federal government doesn’t have to create a whole new program. The government, Kennedy wrote, could make the coverage available to women by paying for it.

Justice Kennedy’s workaround might now become reality. Tom Goldstein, the publisher of Scotusblog and an appellate lawyer, predicted prior to today’s decision that the Obama administration “will by regulation provide for the government to pay for the coverage” so there won’t be a substantial gap in coverage.

In her dissent, Justice Ginsburg warned that the majority’s expansive reading of the Obamacare law “raises a host of ‘Me, too’ questions. Can an employer in business for profit opt out of coverage for blood transfusions, vaccinations, antidepressants, or medications derived from pigs, based on the employer’s sincerely held religious beliefs opposing those medical practices?”

And it seems likely that employees at closely held companies could see insurance coverage of more than birth control covered at the discretion of owners. “There’s nothing about contraceptives other than personal opinion, personal moral belief, that distinguishes them from other guaranteed health benefits around which people may have personal moral beliefs,” Sara Rosenbaum, a professor of health policy at George Washington University, told Bloomberg News. “Why couldn’t a company’s owner say they’re morally opposed to treating patients with HIV? Morally opposed to blood transfusions? To immunizations?”

Eric Rassbach, deputy general counsel of the Becket Fund for Religious Liberty, which brought the case on behalf of Hobby Lobby, celebrated the victory and looked ahead to future challenges. “They left for another day the issue of nonprofit institutions,” he said of the Supreme Court decision. The government already has an exemption for institutions like churches. “The existence of those accommodations means the government hasn’t used the least restrictive means to argue against Hobby Lobby,” Rassbach said.

The next step, he suggested, will be emergency applications before the Supreme Court—applications made to a single justice—filed by two nonprofit organizations challenging the contraception requirement.