A three-judge panel unanimously upheld a ruling Wednesday finding that North Carolina’s ban on abortions after 20-weeks is unconstitutional.

The state implemented the partial ban in 1973 following Roe v. Wade, which legalized abortion. The North Carolina legislature adopted amendments in 2015 that imposed several additional requirements to receive an abortion such as longer waiting periods, reporting requirements, and other measures meant to narrow who was allowed to receive an abortion.

Advocacy groups argued that abortion providers would be prosecuted for performing the procedure, with a judge agreeing in 2019 and blocking the law’s enforcement in cases where the unborn baby is considered not viable.

The 4th U.S. Circuit Court of Appeals upheld the 2019 decision. The defendants argued abortion providers had no standing to sue over the law, noting North Carolina has never charged an abortion provider under the statutes and doesn’t have plans to do so. Judge Diana Gribbon Motz, however, said state lawmaker’s attempt to codify the law in 2015 proved defendants want the law enforced.

“It is difficult to explain why the legislature would have altered the text of the 20-week ban if it did not expect for those words to ever be given effect,” she wrote. “As a nation we remain deeply embroiled in debate over the legal status of abortion. While this conversation rages around us, this court cannot say that the threat of prosecution to abortion providers who violate the law is not credible.”

Planned Parenthood celebrated the ruling in a statement.

“Today’s ruling is an important victory for our patients across North Carolina,” Planned Parenthood South Atlantic President and CEO Jenny Black said in a statement

“Abortion remains inaccessible for many North Carolinians, and we will continue to protect and expand access to this essential health care. When people can make decisions about their pregnancies that are best for them, families thrive and we build communities where each of us can participate fully and with dignity,” she continued.

The Supreme Court recently agreed to take up a case challenging Mississippi’s 15-week abortion ban. The case will hear whether abortion bans prior to fetal viability are constitutional. Unborn babies are considered viable at 24 weeks but typically require medical attention and a stay in the Neonatal Intensive Care Unit.