The Supreme Court on Tuesday voted 7-2 to uphold a 2016 Indiana abortion law requiring fetal remains be buried or cremated.

The court also refused to hear a question regarding the state’s attempt to ban abortions based on a fetus’s race, disability or gender. A lower court’s decision striking down the controversial measure will remain in place.

The Supreme Court’s ruling stems from a lawsuit filed in 2016 on behalf of Planned Parenthood of Indiana and Kentucky against the commissioner of the Indiana State Department of Health over House Enrolled Act 1337.

The bill was signed into law by then-Indiana Gov. Mike Pence (R) in March 2016 and includes several provisions related to abortion and perinatal hospice care ― two of which were challenged by Planned Parenthood and the American Civil Liberties Union.

The Supreme Court on Tuesday reversed a decision made in the U.S. Court of Appeals for the 7th Circuit, which ruled Indiana’s law requiring fetal remains be buried or cremated as unconstitutional. In its decision, the Supreme Court said it has already acknowledged that states have a “legitimate interest in proper disposal of fetal remains.”

Conservative Justice Clarence Thomas wrote a concurring opinion, stating simply that he “thought it could go without saying that nothing in the Constitution or any decision of this Court prevents a State from requiring abortion facilities to provide for the respectful treatment of human remains.”

The court noted that Planned Parenthood did not argue that Indiana’s fetal disposition measure imposes an “undue burden” on a woman’s right to an abortion so therefore the undue burden test created by the 1973 Roe v. Wade decision was not applied to this case.