A federal judge has blocked the Trump administration's loosened birth control rules from going into effect in 13 states and the District of Columbia on Monday as scheduled.

The Department of Health and Human Services created rules allowing employers to opt out of birth control coverage due to religious or moral objections. Employers otherwise have to offer health insurance that covers a range of birth control options, from the pill to intrauterine devices to emergency contraception, at no cost to patients.

The decision to block the rules from taking effect was issued Sunday by Judge Haywood Gilliam, who was nominated by former President Barack Obama and previously blocked an interim version of the exemptions.

Anti-abortion and religious organizations had asked for the Trump administration to allow for certain exemptions to Obamacare's birth control mandate. Some organizations oppose all forms of birth control and sterilization, while others oppose specific kinds, such as IUDs and emergency contraception, which they say are abortifacients because their labels say they can prevent a fertilized egg from attaching to the uterus.

The decision in the U.S. District Court for the Northern District of California was issued Sunday in response to a lawsuit filed by Democratic attorneys general. The injunction only applies to D.C. and the 13 states that filed the lawsuit, even though the attorneys general had asked for the injunction to be applied nationwide.

The birth control mandate is an outgrowth of Obamacare. The law was written to allow HHS to decide what type of preventive care health insurance plans should cover without copays, and the Obama administration determined that all forms of birth control should be included.

The obligation previously had exemptions for houses of worship, but not for businesses or nonprofit organizations. Those who didn't comply would be fined, and after the Supreme Court asked the Obama administration to find a workaround, groups again challenged them in court.

The Trump administration wrote its own rules that loosened the exceptions. The religious exemption applies to any type of employer, but the moral exemption doesn't apply to publicly traded businesses or government entities. The administration has estimated that between 6,400 and 127,000 women will be affected.