Pete Marovich/Getty Images A federal judge has issued a permanent injunction of a controversial Texas law that would have required abortion providers to bury or cremate fetal tissue.

A federal judge blocked a controversial Texas law on Wednesday that would have required health care providers to bury or cremate fetal tissue from abortions, miscarriages, stillbirths and surgeries for ectopic pregnancies.

U.S. District Judge David Ezra’s permanent injunction said the law would impose significant burdens on women experiencing pregnancy loss and would violate a woman’s right to obtain a legal abortion, while conveying few, if any, benefits, NPR reported.

The order was the latest in a series of setbacks for state leaders and anti-abortion advocates who’ve been pushing for the so-called fetal burial regulation.

The regulation, passed last year as part of the wide-ranging anti-abortion measure Senate Bill 8, mandated that health care facilities bury or cremate all fetal and embryonic tissue instead of disposing of it as medical waste — regardless of the patient’s personal wishes or religious beliefs.

Supporters of the law, including Texas Attorney General Ken Paxton, whose office has been defending it in court, said the rule was aimed at ensuring the “humane disposition of fetal remains” and had nothing to do with restricting women’s reproductive rights.

But the law’s opponents ― including a coalition of Texas abortion providers and women’s reproductive health groups that filed a lawsuit ― said the regulation attempts to shift perceptions about the nature of fetal remains to elicit an emotional response.

“Make no mistake, these restrictions were designed to shame and stigmatize patients and health care providers,” Amy Hagstrom Miller, president of Whole Woman’s Health, the suit’s lead plaintiff, said in a statement, according to the Texas Tribune.

Today’s decision is a step in the right direction for women’s access to health care and family planning support #sb8 #txlege #fightbacktx pic.twitter.com/iWWgA4UQJe — Whole Woman's Health (@WholeWomans) September 5, 2018

Opponents also said the law ― which was set to take effect on Feb. 1 but was temporarily blocked in an earlier court decision ― was a “politically motivated” effort to force the closure of abortion providers that would likely struggle to meet the new disposal requirements.

In his ruling, Ezra said he believed this fear to be valid, saying the law “would likely trigger a shutdown of women’s health care providers unable to cobble together a patchwork of funeral homes, crematoriums, and cemeteries to meet their disposal needs.”

“Clinic closures would further constrain access to abortion in a state where access to abortion has already been dramatically curtailed,” the judge added.

Paxton expressed disappointment at the injunction, and suggested Texas would appeal.

“Today’s ruling is disappointing, but I remain confident the courts will ultimately uphold the Texas law, which honors the dignity of the unborn and prevents fetal remains from being treated as medical waste,” the attorney general said in a statement.

AG Paxton Vows to Continue Fight to Honor the Dignity of the Unborn and Defend Texas’ Law on the Humane Disposition of Fetal Remains https://t.co/9LIq09O1Nq — TX AG's Office (@TXAG) September 5, 2018

As The New York Times noted, the case is expected to be appealed to the Fifth Circuit Court of Appeals in New Orleans, described as “one of the most conservative federal appellate courts in the country.” That court’s decision will likely then be appealed to the Supreme Court.

Opponents said they are ready for the legal slog.

“The state of Texas is relentless, but so are we in terms of advocating for the rights of Texas women,” Molly Duane, attorney for the Center for Reproductive Rights, another lawsuit plaintifs, told NPR.