(Bloomberg) -- A federal judge in California temporarily blocked the Trump administration’s plan to exempt companies with religious or moral objections from an Obamacare requirement that employers include free contraception in their health-care plans, though the ruling only applies in 13 states.

U.S. District Judge Judge Haywood Gilliam in Oakland, California, on Sunday issued a preliminary injunction against the Affordable Care Act exemption, ramping up the culture war triggered by President Donald Trump’s attempt to extend "religious freedom" rights from churches to companies. The rules are set to take effect Monday.

The decision is a victory for a coalition of blue states led by California Attorney General Xavier Becerra. In a separate case, Pennsylvania Attorney General Josh Shapiro and his New Jersey counterpart, Gurbir Grewal, are seeking an injunction that could apply nationwide. A ruling in that case is expected any time.

An interim version of the new rules was previously blocked nationwide by Gilliam and by a Philadelphia judge, though a San Francisco-based appeals court later said Gilliam should have limited the scope of his injunction to the states in California’s coalition. A lawsuit by the Massachusetts attorney general was rejected on the grounds that the state didn’t have standing to sue. That ruling is on appeal.

Haywood’s ruling, for now, blocks the religious and moral exemptions to the Obamacare requirement from taking effect in the California-led group of states while the litigation plays out, potentially heading to trial. The U.S. Supreme Court will probably have the final say on the matter.

Religious organizations are already exempted, but Trump seeks to roll back the free contraception requirement for more categories of employers, including publicly traded companies.

To contact the reporter on this story: Erik Larson in New York at elarson4@bloomberg.net

To contact the editors responsible for this story: Heather Smith at hsmith26@bloomberg.net, James Ludden, Ros Krasny

©2019 Bloomberg L.P.