North Carolina’s decades-old ban on abortion after 20 weeks of pregnancy is unconstitutional and poses a credible threat of prosecution to abortion providers, a federal appeals court unanimously affirmed Wednesday.

The ruling comes one month after the U.S. Supreme Court announced that it will review a case challenging Mississippi’s restrictive ban and consider whether “all pre-viability prohibitions on elective abortions” are unconstitutional.

The U.S. Court of Appeals for the 4th Circuit was examining a 1973 law generally barring women from terminating their pregnancies after 20 weeks, a measure similar to laws in more than a dozen other states. The court rejected North Carolina’s argument that it was a case without controversy because no abortion providers have been prosecuted under the state’s law.

“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,” Judge Diana Motz wrote in the 15-page opinion.

She pointed to “a wave of similar state action across the country” restricting access to abortion and said, “we cannot reasonably assume that the abortion ban that North Carolina keeps on its books is ‘largely symbolic.’ ”

Motz, a nominee of President Bill Clinton, was joined by Judges Albert Diaz, a nominee of President Barack Obama and Julius Richardson, a nominee of President Donald Trump.

The lawsuit was filed after the North Carolina legislature amended the statute in 2015 to narrow medical exemptions. The law has been blocked since a district court judge struck down the measure in 2019.

North Carolina officials did not defend the constitutionality of the law but said abortion providers did not have standing to bring the lawsuit because the threat of prosecution was not credible.

Abortion rights advocates and providers praised the ruling, saying it adheres to Supreme Court rulings since Roe v. Wade that have said states cannot block women from having abortions before a fetus is viable and could survive outside the womb.

North Carolina is a “haven where patients can access abortion even as politicians throughout the south pass dozens of restrictions attacking fundamental rights,” Nancy Northup, who leads the Center for Reproductive Rights, said in a statement. “As the Court held, ‘[t]he Providers have a right to insist that North Carolina comply with the Constitution — and so do their patients.’ ”

North Carolina is one of 15 states, including Texas, Ohio and Louisiana, with similar laws. The case comes as many Republican-led state legislatures have proposed or passed measures that make it more difficult for women to access abortion services or place restrictions on medical professionals and clinics where abortions are performed.

Abortion opponents are hoping the newly configured Supreme Court, with three justices nominated by Trump, will be more amenable to overturning the 1973 Roe v. Wade decision.