A federal judge in Pennsylvania stepped in to halt a new Trump administration rule that was expected to limit women’s access to birth control nationwide.

The rule would’ve given private employers the right to opt out of covering no-copay contraception because of moral or religious beliefs.

In her ruling, U.S. District Judge Wendy Beetlestone maintained that securing the health of women and keeping health-care costs down outweighs any potential harm to the Trump administration. Her decision was part of a one-two legal punch against the rule this week. On Sunday, a California judge also blocked the rule in 13 states and the District of Columbia, as Bloomberg reported.

Why does birth control access matter?

To understand the potential impact of this rule, it’s important to know most women get insurance (and birth control coverage) through their employer. When women lose insurance coverage of birth control, it costs them roughly $250 more per year out-of-pocket, according to a study of the first year of the Affordable Care Act’s no-copay birth control benefit.

How did we get here?

When the Affordable Care Act passed, it required most insurance plans to cover FDA-approved contraception with no co-pay. Some religious employers, like churches, sued, claiming providing birth control coverage to their employees violated their beliefs. The Obama administration created a workaround: Churches could opt out, but church employees could still get contraceptive coverage.

When President Trump took office, his supporters claimed that providing birth control violated “religious liberty.” They encouraged the administration to push for broader exceptions to the birth control benefit—such as for moral or religious reasons—and for non-religious employers to be allowed to opt out.

Last year, the administration rolled out the rule, called the Moral Exemptions and Accommodations for Coverage of Certain Preventive Services Under the Affordable Care Act. It was set to take effect this week.

What happens next?

Either of these cases may eventually wind up in the U.S. Supreme Court. The court now includes two Trump-appointed conservative justices, who may side with the administration over the rule.