A federal judge has blocked a controversial Texas law from going into effect—one that would have required health care providers to cremate or bury fetal remains—because of the restrictions it would impose on a woman’s legal right to obtain an abortion.

In Whole Women’s Health v. Smith, abortion-rights groups argued that S.B. 8, a law passed last year by the Texas Legislature requiring health care providers to cremate or bury fetal remains, violated both the due process and equal protection clauses of the U.S. Constitution.