A federal district judge handed a victory to abortion rights groups Wednesday when he struck down part of a Texas law curbing access to the most common second-trimester abortion procedure, called dilation and evacuation.

In a decision that will be appealed before the U.S. 5th Circuit Court of Appeals, Judge Lee Yeakel said the provision imposes an "undue burden" on women seeking second-trimester abortions in the state.

It had been slated to go into effect Sept. 1 as part of Senate Bill 8, a law signed by Gov. Greg Abbott earlier this year. But the Center for Reproductive Rights and Planned Parenthood filed suit in July on behalf of several women’s health providers in the state. Yeakel issued a temporary restraining order on enforcing the measure in August, a day before the ban's effective date.

The temporary restraining order was set to expire Wednesday evening.

With the ruling in place, abortion providers may continue using the dilation and evacuation method without first ending the fetus’ life – the state requirement that reproductive rights advocates say is unnecessary and risky to the mother. Opponents call the dilation and evacuation procedure, where doctors use surgical instruments to grasp and remove pieces of fetal tissue, inhumane and brutal.

"The court concludes that requiring a woman to undergo an unwanted, risky, invasive, and experimental procedure in exchange for exercising her right to choose an abortion, substantially burdens that right," Yeakel wrote in the opinion.

He added: "The State's valid interest in promoting respect for the life of the unborn, although legitimate, is not sufficient to justify such a substantial obstacle to the constitutionally protected right of a woman to terminate a pregnancy before fetal viability."

Almost immediately after the ruling was issued, Attorney General Ken Paxton issued a statement saying he'd appealed.

The trial "allowed us to build a record like no other in exposing the truth about the barbaric practice of dismemberment abortions," he said. "We are hopeful the 5th Circuit will respect the will of the Texas Legislature by upholding Texas’ lawful authority to protect the dignity of innocent unborn children as they die.”

The lawsuit is one in a succession of regulatory and legal challenges to abortion access in the state, including a case that made its way to the U.S. Supreme Court in 2016.

Whole Woman’s Health, a Texas reproductive health provider and abortion rights group and the lead plaintiff in this case, cheered the ruling Wednesday.

"The pattern of incessant and dangerous attacks on women’s healthcare has not stopped," Amy Hagstrom Miller, president and CEO of Whole Woman’s Health, said in a statement. "That is why we are here, and why we are thrilled to prevail."

During a five-day trial in November, arguments turned on whether the benefits of the fetal demise requirement outweighed the burdens it imposes on patients and doctors.

The plaintiffs argued forcefully that they don’t – calling to the stand witnesses who said making fetal demise a prerequisite for the procedure would force women to take on needless medical risks and surmount logistical barriers.

Janet Crepps, a lawyer representing the health providers, said in closing arguments that the law would leave physicians with "impossible choices" – in part because if an attempt to cause demise failed, the abortion provider could be open to prosecution and jail time.

Doctors who have provided abortions described three methods for causing fetal demise that are used starting about midway through the second trimester. The plaintiffs’ witnesses said using those methods earlier in a pregnancy was unnecessary, untested and could not always guarantee demise.

But the state's lawyers counter-argued that ending the fetus’ life before the procedure is humane and not too onerous a requirement.

At one point, Darren McCarty, a lawyer for the state, referenced grisly images of "dismembered" fetal remains shown in the courtroom and said, "That's the result of the [dilation and evacuation procedure], and it was done while the fetus was alive."

"I would say that the question before this court is quite simple, and it is: Can Texas require that a fully-formed and nearly viable unborn child be accorded a more humane manner of death?" McCarty said.

A doctor who testified for the state said there are multiple ways to cause fetal demise and that some of the problems identified by the plaintiffs were being inflated. John Seago, legislative director for Texas Right to Life, called the testimony "powerful" and "excruciating," and said it got to "the core moral question of the debate for us."

"That kind of spotlight on the practice of abortion is extremely rare," he said, comparing the case to previous ones that centered on how far women would need to drive to a clinic and similar considerations.

Yeakel, in his decision, wrote that the law's provisions would put women "in a unique position: the court is unaware of any other medical context that requires a doctor – in contravention of the doctor's medical judgment and the best interest of the patient – to conduct a medical procedure that delivers no benefit to the woman."

He said the delay and extra cost associated with requiring fetal demise – including "perhaps travel, lodging, time away from work, and child care" – would be "particularly burdensome for low-income women, many of whom must wait to seek a second-trimester abortion, because of the time required to obtain the funding to cover the costs of the abortion."

None of the methods for causing fetal demise proposed by state lawyers are "feasible for any physician other than a specialist in maternal-fetal medicine, without substantial additional training," Yeakel wrote.

"Words are important. That a woman may make the decision to have an abortion before a fetus may survive outside her womb is solely and exclusively the woman's decision. The power to make this decision is her right," he wrote.

Disclosure: Planned Parenthood has been a financial supporter of The Texas Tribune. A complete list of Tribune donors and sponsors is available here.