Hundreds of demonstrators rally and march in opposition to the U.S. Supreme Court's decision overturning Roe v. Wade in downtown Raleigh, N.C., on June, 24, 2022. Abortions in North Carolina are no longer legal after 20 weeks of pregnancy, a federal judge ruled Wednesday, Aug. 17, 2022.
CNN  — 

A US district court judge in North Carolina on Wednesday allowed a North Carolina law that bans abortions after 20 weeks of pregnancy to be reinstated, lifting an injunction he had placed on the state law prior to the US Supreme Court decision overturning Roe v. Wade.

In 2019, District Judge William Osteen had stopped the law from being enforced and declared the ban unconstitutional based on Supreme Court precedent. His decision was upheld in 2021 by an appeals court.

But in his order Wednesday, Osteen wrote that “under Dobbs, there is now no constitutional right to a pre-viability abortion, thus depriving the injunction of any constitutional basis from which to enjoin the challenged North Carolina laws regulating abortion.”

He also disagreed with the parties in the lawsuit that lifting the injunction would lead to confusion, instead saying that “leaving the injunction in place wrongfully heightens confusion because to do so is misleading as to the effect of Dobbs.”

“Neither this court, nor the public, nor counsel, nor providers have the right to ignore the rule of law as determined by the Supreme Court,” he added.

Abortion rights advocates called Osteen’s ruling an “egregious overstep by the court.”

“Despite the fact that this law has long been rightfully blocked, the court reopened the case in an unprompted move that all parties explicitly opposed. This decision to disrupt the abortion access landscape in North Carolina and the surrounding region only worsens the chaos and crisis ensuing across the country in the wake of the Supreme Court’s decision to overturn Roe v. Wade. People will suffer from this dangerous ban,” the groups, including Planned Parenthood South Atlantic, a plaintiff in the lawsuit, said in a joint statement.

North Carolina Gov. Roy Cooper, a Democrat, on Wednesday said that the “significant problem with this ruling is that it will criminalize important health care that’s needed in certain extraordinary circumstances.”

“Abortion past 20 weeks in pregnancy is exceptionally rare and happens because of a devastating health emergency or diagnosis. Denying women necessary medical care in extreme and threatening situations, even if rare, is fundamentally wrong, and we cannot let politicians mislead people about the real world implications of this harmful law,” he said in a statement.

He added that the “vast majority of patients will still be able to access reproductive health care in North Carolina, and I remain committed to protecting it.”

North Carolina doctors and Planned Parenthood South Atlantic had first brought the suit against the law in 2016.

After the Supreme Court ruling, Republican legislative leaders have pushed for the injunction to be lifted while North Carolina’s Democratic Attorney General Josh Stein said in a statement last month that he would not take action to lift the hold.

North Carolina House Speaker Tim Moore, a Republican, said in a statement Wednesday he is “encouraged that, although our attorney general has failed to do his duty, today we have a ruling that upholds the law.”

“With Roe vs. Wade being overturned by the Supreme Court, the legal basis for the injunction was no longer existent, and the people’s determination of abortion policy through their elected representatives in the General Assembly was restored,” Tami Fitzgerald, the head of the anti-abortion group North Carolina Values Coalition, said in a statement.

Fitzgerald called the reinstatement of the law “just the beginning” and said NC Values Coalition would “work hard to get legislation passed” that would further restrict the procedure.

CNN’s Dianne Gallagher contributed to this report.