A divided federal appeals court blocked the Trump administration Thursday from enforcing a series of revised ObamaCare rules that would have enabled more employers to opt out of providing contraception coverage to workers over religious or moral objections.

The 2-1 ruling by the 9th Circuit Court of Appeals found that a group of five states were likely to succeed in claiming that the changes to the Affordable Care Act were made without the required notice and period of public comment.

ObamaCare originally required most companies to cover birth control at no additional cost, though it included exemptions for religious organizations. The Trump administration's 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.

California filed a lawsuit to block the changes and was joined by Delaware, Maryland, New York and Virginia. The state argued that the change could result in millions of California women losing free birth control services, leading to unintended pregnancies that would tax the state's health care and other social programs.

The panel's ruling barred enforcement of the rule changes in those states but also vacated part of a preliminary injunction issued last year by a California federal judge that barred the rules from being enforced nationwide.

KAVANAUGH CASTS DECIDING VOTE AS SUPREME COURT REJECTS REVIEW OF MEDICAID FUNDING FOR PLANNED PARENTHOOD

"The scope of the [preliminary] injunction is overbroad," Senior Judge J. Clifford Wallace wrote in the majority opinion.

The Department of Justice said in court documents that the revised rules were about protecting a small group of "sincere religious and moral objectors" from having to violate their beliefs. The department had no immediate comment on Thursday's ruling.

NAPOLITANO: THE CHIEF JUSTICE TAKES ON TRUMP

Trump has criticized the 9th Circuit after its judges have dealt him a series of legal setbacks on immigration and other White House policies.

The Associated Press contributed to this report.