San Francisco – A divided U.S. appeals court Thursday blocked rules by the Trump administration that allowed more employers to opt out of providing women with no-cost birth control.

The ruling, however, may be short lived because the administration has adopted new rules on contraceptive coverage that are set to take effect next month and will likely prompt renewed legal challenges.

Thursday’s ruling by a three-judge panel of the 9th U.S. Circuit Court of Appeals concerned changes to birth control coverage requirements under President Barack Obama’s health care law that the U.S. Department of Health and Human Services issued in October 2017.

States were likely to succeed on their claim that those changes were made without required notice and public comment, the appeals court panel said in a 2-1 decision.

The majority upheld a preliminary injunction against the rules issued by U.S. District Judge Haywood Gilliam last year. It, however, limited the scope of the injunction, applying it only to the five states in the lawsuit and not the entire country.

Another federal judge also blocked the rules, and her nationwide injunction remains in place.

An email to the Justice Department seeking comment was not immediately returned.

Obama’s health care law required most companies to cover birth control at no additional cost, though it included exemptions for religious organizations. The new policy allowed more categories of employers, including publicly traded companies, to opt out of providing free contraception to women by claiming religious objections. It also allowed any company that is not publicly traded to deny coverage on moral grounds.

The Department of Justice said in court documents that the rules were about protecting a small group of “sincere religious and moral objectors” from having to violate their beliefs. The changes were favored by social conservatives who are staunch supporters of President Donald Trump.

California filed a lawsuit to block the changes that was joined by Delaware, Maryland, New York and Virginia.

The states argued that the changes could result in millions of women losing free birth control services, forcing them to seek contraceptive care through state-run programs or programs that the states had to reimburse.

The states show with “reasonable probability” that the new rules will lead women to lose employer-sponsored contraceptive coverage, “which will then result in economic harm to the states,” 9th Circuit Judge J. Clifford Wallace, a nominee of Republican President Richard Nixon, wrote for the majority.

In a dissent, 9th Circuit Judge Andrew Kleinfeld said the economic harm to the states was “self-inflicted” because they chose to provide contraceptive coverage to women. The states, therefore, did not have the authority to bring the lawsuit, Kleinfeld, a nominee of Republican President George H.W. Bush, said.

The case became more complicated after the Trump administration last month issued new birth control coverage rules that are set to supersede those at issue in the lawsuit before the 9th Circuit. Under the new rules, large companies whose stock is sold to investors won’t be able to opt out of providing contraceptive coverage.

Wallace said the new rules did not make the case before the 9th Circuit moot because they are not set to take effect until January.