A federal appeals court on Tuesday allowed Texas to suspend most abortions in the state during the coronavirus public-health crisis, a move that could quickly send the issue to the Supreme Court.

The U.S. Court of Appeals for the Fifth Circuit, in a 2-to-1 ruling, lifted a trial judge’s restraining order that prevented the state from curbing abortions on the grounds that it would save medical resources.

In times of great emergency, states can reasonably restrict constitutional rights to protect public safety, the court’s majority said.

“That settled rule allows the state to restrict, for example, one’s right to peaceably assemble, to publicly worship, to travel, and even to leave one’s home. The right to abortion is no exception,” Judge Stuart Kyle Duncan, a Trump appointee, wrote for the court. Joining him in the majority was Judge Jennifer Elrod, a George W. Bush appointee.

The ruling relied upon a rarely used judicial power to side with Texas, but the court said its approach was justified because a judge in Austin reached a “patently erroneous” result in blocking the state from applying its coronavirus restrictions to abortion.