(CNN) A California federal district court judge halted the Trump administration's weakening of Obamacare's contraceptive mandate Sunday, a day before the new rules were to take effect.

The injunction, however, only applies in the coalition of 13 Democratic states, plus the District of Columbia, that brought the lawsuit.

In his ruling, Judge Haywood Gilliam, Jr., said the states "face potentially dire public health and fiscal consequences from the implementation of the Final Rules."

He noted the states would have to contend with increased costs from providing contraceptive care in clinics to their residents and from a higher rate of unintended pregnancies. Meanwhile, eligible entities can still avail themselves of exemptions or seek accommodations to the mandate.

"The law couldn't be clearer -- employers have no business interfering in women's healthcare decisions," said California Attorney General Xavier Becerra, who led the group. "Today's court ruling stops another attempt by the Trump Administration to trample on women's access to basic reproductive care."

Read More