SAN FRANCISCO (Reuters) - A federal appeals court on Thursday narrowed an order that had blocked President Donald Trump’s administration from enforcing new rules that undermine an Obamacare requirement for employers to provide insurance that covers women’s birth control.

An illustration picture shows a woman holding a birth control pill at her home in Nice January 3, 2013. REUTERS/Eric Gaillard

Last year two federal judges - one in Philadelphia and one in Oakland, California - had blocked the government from enforcing a new guideline allowing businesses or nonprofits to obtain exemptions from the contraception policy on moral or religious grounds. The Justice Department appealed both rulings.

The 9th U.S. Circuit Court of Appeals said on Thursday the government likely violated administrative laws in promulgating the new rules. The appeals court said, however, the injunction issued in California should not apply nationwide, but only within the five states that sued over the policy.

California’s attorney general filed the case, along with AGs in Delaware, Virginia, Maryland and New York.

Despite the 9th Circuit ruling, a nationwide injunction issued by the Philadelphia judge is still in effect while that case is under appeal at the 3rd Circuit, a spokesman for Pennsylvania’s attorney general said on Thursday.

U.S. Justice Department spokeswoman Kelly Laco said single judges should not be able to issue nationwide injunctions, and called the 9th Circuit ruling “a victory for restoring the constitutional order of the federal government and ending abuses of judicial power.”

Meanwhile, California Attorney General Xavier Bacerra in a statement said the decision “is an important step to protect a woman’s right to access cost-free birth control.”

One 9th Circuit judge on the three-judge panel, an appointee of Republican President George H.W. Bush, said he would have revoked the California injunction altogether.

The cases are among several that Democratic state attorneys general filed after the Republican Trump administration revealed the new rules which targeted the contraceptive mandate implemented as part of 2010’s Affordable Care Act, popularly known as Obamacare.

The rules would let businesses or nonprofits lodge religious or moral objections to obtain an exemption from the law’s mandate that employers provide contraceptive coverage in health insurance with no co-payment.

Conservative Christian activists and congressional Republicans praised the move, while reproductive rights advocates and Democrats criticized it.

A new but similar set of federal rules around birth control coverage are set to take effect next month, which are also the subject of separate court challenges.