PHILADELPHIA — A federal judge in Philadelphia on Friday ordered the Trump administration not to enforce new rules that could significantly reduce women's access to free birth control.

Judge Wendy Beetlestone issued the injunction, temporarily stopping the government from enforcing the policy change to former President Barack Obama's health care law.

People in support of birth control participate in a rally outside of a local Health and Human Services office on November 15, 2017 in Atlanta, Georgia. Erik S. Lesser / EPA file

The law required most companies to cover birth control at no additional cost, though it included exemptions for religious organizations. The new policy would allow more categories of employers, including publicly traded companies, to opt out of providing free contraception to women by claiming religious or moral objections.

Beetlestone, appointed to the bench by Obama, called the Trump administration's exemptions "sweeping" and said they are the "proverbial exception that swallows the rule."

She was particularly critical of the power to object on moral grounds, saying it "conjured up a world where a government entity is empowered to impose its own version of morality on each one of us. That cannot be right."

Attorneys for the Trump administration had argued in court documents that the rules are about "protecting a narrow class of sincere religious and moral objectors from being forced to facilitate practices that conflict with their beliefs."

Related: Trump's One-Two Punch Hits Birth Control, LGBTQ Rights

The U.S. Department of Health and Human Services issued the new policy in October. It marked another step in the Trump administration's rollback of the Affordable Care Act, and supporters say it promotes religious freedom.

Pennsylvania Attorney General Josh Shapiro, a Democrat, said that Trump broke the law to undermine women's health and that the ruling will protect women.

"This is just the first step, but today is a critical victory for millions of women and families and for the rule of law," Shapiro said.

The injunction will block the rule from being implemented around the country while the case brought by Shapiro moves forward in Pennsylvania. Shapiro's suit said the rules violate the Fifth Amendment because they pertain to women and not men and the First Amendment, by putting employers' religious beliefs over the constitutional rights of women.

California, Washington and Massachusetts have also sued the Trump administration over the rules. Delaware, Maryland, New York and Virginia joined California in its effort.

Fatima Goss Graves, president of the National Women's Law Center, praised the decision and said the group will continue to fight against the rules.

"Employers' religious beliefs should never determine the care a woman receives," she said.