A federal judge on Monday partially and temporarily blocked Oklahoma’s ban on most abortions during the COVID-19 pandemic, saying the state had acted in an “unreasonable” and “oppressive” way by restricting abortion access.

The ruling came just a week after abortion providers and advocates filed a lawsuit against top state officials challenging Gov. Kevin Stitt’s order that placed a moratorium on most abortions in Oklahoma.

Federal Judge Charles Goodwin granted the abortion providers motion, in part, seeking a temporary restraining order on the ban, which was set to expire on April 30. The restraining order expires on April 20.

The order bars the state from enforcing a temporary ban on medication abortions, in which a woman takes two pills to end an early pregnancy.

Goodwin’s order also prohibits the state from enforcing a ban on some surgical abortions. The ban cannot be enforced if a woman who is currently eligible for a surgical abortion will lose that eligibility after the order expires, Goodwin wrote.

Oklahoma’s attorney general said he will immediately appeal the decision.

“It’s a huge relief that we can start seeing patients again, at least for now,” said Julie Burkhart, founder and CEO of Trust Women, in a statement. “We hope the court will keep the ban blocked so our patients aren’t forced to travel to other states to find abortion care at a time when travel is risky and discouraged.”

Stitt on March 24 placed a suspension on all nonessential medical procedures in the state amid the pandemic in an effort to reserve hospital resources. He clarified on March 27 that abortions were included in that order but said the ban did not extend to abortions in which the mother’s life was in danger.

Nonemergency abortions are prohibited under Oklahoma law when the woman is 20 or more weeks pregnant. Goodwin wrote that Stitt’s order would effectively eliminate a woman’s ability to get an abortion if the order postponed the procedure past that timeframe.

Goodwin wrote that Stitt’s order could require some pregnant women who would be eligible for a medication abortion to instead obtain a “more invasive surgical” procedure.

“Further, this postponement would effectively eliminate the ability of some pregnant persons in Oklahoma who are presently able to obtain a medication abortion, but for whom the surgical option is medically contraindicated, to obtain an abortion at all,” Goodwin wrote.

Oklahoma Attorney General Mike Hunter said he was “very disappointed” in the court’s decision.

“Carving out abortion from the state’s comprehensive efforts to flatten the curve creates a horrible precedent that may encourage a flood of other judicially conjured exceptions, completely undermining the state’s ability to combat the worst public health crisis in Oklahoma history,” Hunted said in an emailed statement.

“We all are making adjustments to help save thousands of lives—abortion providers should be no different. The state is not required to prioritize ending human life in utero over saving human lives, and certainly nothing in the Constitution says so.”

Similar actions in other states

In neighboring Texas, officials there have enacted similar policies to Oklahoma. Abortion providers sued the state on March 25 after the attorney general said abortions should not be performed unless the woman’s life was in danger. A federal judge less than a week later issued a temporary restraining order of the policy.

However, by that afternoon another court had reversed the judge’s restraining order, allowing the attorney general’s order to be enforced.