The U.S. Supreme Court on Tuesday upheld Indiana’s law imposing new requirements on the disposal of aborted or miscarried fetal remains, but the justices left in place the invalidation of restrictions on the ability of women to terminate previability abortions.

Under the two provisions before the justices, abortion clinics and other facilities were required to dispose of aborted or miscarried fetuses through cremation or interment. The law also would prevent women from choosing “discriminatory” abortions based on the sex, race or disability of the fetus. The only exception is for a “fetal condition that … will with reasonable certainty result in the death of the child not more than three months after the child’s birth.”