A federal judge on Sunday blocked Trump administration rules that would allow most businesses to opt out of covering contraception for their employees if they have moral or religious objections.

Judge Haywood Gilliam blocked the rules, which were set to go into effect on Monday, in California, Washington, D.C., and 12 other states. Gilliam granted a request for a preliminary injunction from those states, but limited the ban's scope to only the case's plaintiffs.

California Attorney General Xavier Becerra (D) at the end of December asked Gilliam to block the rules, which would allow more exemptions to ObamaCare's contraception mandate.

Attorneys general in Connecticut, Delaware, Hawaii, Illinois, Maryland, Minnesota, New York, North Carolina, Rhode Island, Vermont, Virginia, Washington state and the District of Columbia joined Becerra's request for an injunction.

"The law couldn't be more clear - employers have no business interfering in women's healthcare decisions," Becerra said in a statement on Sunday. "Today's court ruling stops another attempt by the Trump Administration to trample on women's access to basic reproductive care."

"It's 2019, yet the Trump Administration is still trying to roll back women's rights," Becerra added. "Our coalition will continue to fight to ensure women have access to the reproductive healthcare they are guaranteed under the law."

The administration issued draft rules that took effect immediately last year, but they have been blocked by several courts.

Gilliam on Friday said a "substantial number" of women would lose birth control coverage under the Trump administration rules.

"It is a good day when a court stops this administration from sanctioning discrimination under the guise of religion or morality," Louise Melling, deputy legal director of the American Civil Liberties Union, said in a statement. "The Trump administration's rules authorized employers and universities to strip women of birth control coverage - a benefit guaranteed to them by law, and meant to advance their health and equality. We applaud the order to enjoin the enforcement of these discriminatory rules."