In a win for reproductive rights activists, the Supreme Court struck down a Lousiana law on Monday which required doctors performing abortions to having admitting privileges at a hospital “not further than 30 miles from the location at which the abortion is performed or induced.”

Chief Justice John Roberts sided with the liberal justices in the 5-4 decision of June Medical Services v. Russo, deeming the law unconstitutional.

The state argued the requirement protected women’s health, but pro-choice advocates noted that many hospitals in the region are religiously-affiliated and do not allow abortions to take place within their facilities.

Only two of the five doctors who provide abortions in Louisiana have admitting privileges — one in New Orleans and one in Shreveport. However, the Shreveport doctor had testified that he would be unable to handle the clinic’s work alone, effectively meaning there would only be a single doctor in a single clinic in New Orleans allowed under the state law to provide abortions.

In the plurality opinion, joined by Justices Ruth Bader Ginsburg, Elena Kagan and Sonia Sotomayor, Justice Stephen Breyer wrote that the law creates an “undue burden” on those seeking abortions.

“A Shreveport resident seeking an abortion who might previously have obtained care at one of that city’s local clinics would either have to spend nearly 20 hours driving back and forth, or else find overnight lodging in New Orleans,” referring to state’s required waiting period between an initial consultation and the procedure, Breyer wrote. “The burdens of this increased travel would fall disproportionately on poor women, who are least able to absorb them.”

Breyer also noted that the law was “almost word-for-word identical” to a Texas law that was struck down by the Supreme Court in 2016 in Whole Woman’s Health v. Hellerstedt.

Roberts, who voted to uphold the Texas law, filed a concurring opinion on Monday in which he said his decision was a matter of precedent.

“I joined the dissent in Whole Woman’s Health and continue to believe that the case was wrongly decided,” Roberts wrote. “The question today, however, is not whether Whole Woman’s Health was right or wrong, but whether to adhere to it in deciding the present case.”

He continued: “The Louisiana law imposes a burden on access to abortion just as severe as that imposed by the Texas law, for the same reasons. Therefore Louisiana’s law cannot stand under our precedents.”

Justice Samuel Alito wrote in a dissenting opinion, joined by Justices Clarence Thomas, Neil Gorsuch and Brett Kavanaugh, that the admitting privileges requirement ensures that only competent doctors can conduct abortion procedures.

“There is ample evidence in the record showing that admitting privileges help to protect the health of women by ensuring that physicians who perform abortions meet a higher standard of competence than is shown by the mere possession of a license to practice,” Alito wrote. “In deciding whether to grant admitting privileges, hospitals typically undertake a rigorous investigative process to ensure that a doctor is responsible and competent and has the training and experience needed to perform the procedures for which the privileges are sought.”