A federal appeals court panel ruled Tuesday that a Mississippi law that would close the state’s only abortion clinic is unconstitutional.

The three-judge panel of the fifth US circuit court of appeals issued its 2-1 ruling in a case involving the state’s 2012 law, which required physicians at the clinic, Jackson Women’s Health Organization, to obtain admitting privileges at a local hospital.

Physicians at the clinic applied for the privileges at Jackson-area hospitals but were unable to get them.

Attorneys for Mississippi argued that if the clinic closed, women could get abortions in other states.

“Today’s ruling ensures women who have decided to end a pregnancy will continue, for now, to have access to safe, legal care in their home state,” Nancy Northup, president and CEO of the Center for Reproductive Rights, said in a news release.

The appeals court panel ruled that a US supreme court decision in 1973 established a constitutional right to abortion. The panel ruled that Mississippi may not shift its obligation for established constitutional rights of its citizens to another state.

“Pre-viability, a woman has the constitutional right to end her pregnancy by abortion. HB 1390 effectively extinguishes that right within Mississippi’s borders,” wrote the two judges in the majority ruling, E Grady Jolly of Mississippi and Stephan A Higginson of Louisiana.

The Mississippi law, signed by Republican Governor Phil Bryant, was in House Bill 1390.

The fifth circuit handles cases from Mississippi, Louisiana and Texas. Judge Emilio M Garza of Texas wrote that he disagreed with the ruling by Jolly and Higginson.

“Because the undue burden test requires an assessment of the difficulty of obtaining abortion services, whether in a woman’s own state or a neighboring state, and because neither the district court nor the majority has undertaken this assessment, I respectfully dissent,” Garza wrote.

In late March, the fifth circuit upheld a 2013 Texas law that puts several restrictions on abortion clinics, including requiring their physicians to have admitting privileges at a hospital within 30 miles. After that, the Center for Reproductive Rights filed a new lawsuit challenging parts of the Texas abortion law, including the admitting privileges requirement.