A three-judge appeals court panel on Tuesday struck down a Texas law that bans dilation-and-evacuation abortions.

Judge James Dennis, writing for the 2-1 majority on the 5th Circuit panel, said the Texas law “unduly burdens a woman’s constitutionally-protected right to obtain a previability abortion.”

He said the law “confers no medical benefit for women patients while forcing them to undergo unnecessary, painful, invasive, and even experimental procedures.”

The abortion rule in question bars Dilation and Evacuation (D&E) abortions, sometimes known as “dismemberment abortion,” which typically take place in the second trimester, using forceps and other instruments to remove the fetus from the womb.

Advocates of the law say it is defensible under the 2007 U.S. Supreme Court ruling Gonzales v. Carhart, which says states have a “compelling interest in protecting the integrity and ethics of the medical profession and in protecting the life of the preborn child.”

However, the Center for Reproductive Rights, which is a party to the lawsuit challenging the measure, argues that the procedure is the safest and most common way to perform an abortion in the second trimester of pregnancy.

In November 2017, a federal district court temporarily blocked the Texas law, saying it was unconstitutional because it placed an “undue burden” on a woman’s “right to an abortion.”

Tuesday’s decision upheld that ruling, with the court issuing a permanent injunction. The 2-1 majority said requiring women to undergo more costly and less common alternatives for second-trimester abortion procedures would infringe upon a woman’s right to choose abortion.

Texas is expected to appeal the decision, which would mean the case would go before the full 17-judge appellate court.

The Texas law is one of several abortion restrictions that has potential to come before the U.S. Supreme Court in coming months. The death of Supreme Court Justice Ruth Bader Ginsburg and nomination of Judge Amy Coney Barrett as her replacement has sparked heightened speculation about the possibility of the court hearing an abortion case that could lead to the reconsideration of Roe v. Wade.

The Texas abortion ban was part of Senate Bill 8, which was passed in response to a 2016 U.S. Supreme Court ruling that struck down a 2013 state law that had helped close more than half of Texas’ 41 abortion clinics.