INDIANAPOLIS (AP) — A federal judge has barred Indiana from enforcing a 2016 law’s provisions that require abortion clinics to either bury or cremate fetal remains, finding that they violate the U.S. Constitution.

U.S. District Judge Richard L. Young ruled that the law’s requirements infringe on the religious and free speech rights of people who do not believe aborted fetuses deserve the same treatment as deceased people.

“The Constitution prohibits ‘mechanisms, overt or disguised, designed to persecute or oppress a religion or its practices.’ The fetal disposition requirements are contrary to that principle,” Young wrote in Monday’s decision, which granted summary judgment to the plaintiffs who had sued the state.

Indiana Attorney General Todd Rokita, a defendant in the lawsuit, said Tuesday that his office will appeal the ruling, The Indianapolis Star reported.

The lawsuit was filed in 2020 on behalf of the Women’s Med Group abortion clinic in Indianapolis, its owner, two nurse practitioners who work at the clinic and three women who are each listed only as Jane Doe.

Shortly after the law was signed in 2016 by then-Gov. Mike Pence, Planned Parenthood of Indiana and Kentucky and the ACLU of Indiana sued the state over the law.

The state appealed that lawsuit all the way to the U.S. Supreme Court, which upheld the law’s fetal disposition provisions in May 2019, allowing the state to enforce the requirement that abortion clinics either bury or cremate fetal remains following an abortion. The court’s ruling found that the state of Indiana had a legitimate interest in how fetal remains are disposed.

Rokita pointed to that ruling in a statement Tuesday, saying that the law “safeguards human dignity.”

But Stephanie Toti, one of the attorneys in the 2020 lawsuit, told The Indianapolis Star after the suit was filed that she felt the U.S. Supreme Court’s ruling left open the possibility to challenge the requirements as unconstitutional because they “trample on everyone’s beliefs.”

The 2020 suit alleges that Indiana’s requirements caused both abortion and miscarriage patients “shame, stigma, anguish, and anger” because they “send the unmistakable message that someone who has had an abortion or miscarriage is responsible for the death of a person.”

In his ruling, Young disagreed with some of the plaintiffs’ arguments. But he said that overall, the state failed to convince the court that the requirements do not burden the rights of the three anonymous female plaintiffs to express their religious and moral beliefs.

Attorneys from the state attorney general’s office argued that the state has the right to express a preference for childbirth instead of abortion, Young wrote.

But the judge added that “just because the government may use its voice to espouse an idea does not mean it can compel other voices to speak its message.”

Rupali Sharma, an attorney for the plaintiffs, praised Young’s decision in a statement Tuesday, calling it “a victory for those seeking and providing vital pregnancy care.”

Sharma, the senior counsel and director at the Lawyering Project, added that the ruling is “a potent reminder that people do not lose cherished rights under the First Amendment the moment they become pregnant.”