A federal appeals court panel on Tuesday struck down a Mississippi law that would have had the effect of closing the state’s only remaining abortion clinic.

The U.S. Court of Appeals for the Fifth Circuit ruled, 2-1, in Jackson Women’s Health Organization v. Currier against the law, which required abortion clinic doctors to obtain admitting privileges at a hospital.

The decision found that the law was unconstitutional as applied because it in effect shunted the state’s constitutional obligations to other states. Mississippi had defended the law, stating that even if the abortion clinic in Jackson closed, state residents could obtain abortions in Tennessee, Louisiana or Alabama.