Want the best of VICE News straight to your inbox? Sign up here.

The Supreme Court just delivered a major victory to abortion rights supporters by striking down a Louisiana abortion restriction on Monday. The case, the first major test of abortion rights since conservative Justices Brett Kavanaugh and Neil Gorsuch joined the bench, could have spelled the end of legal abortion in large swaths of the United States.

The case, June Medical Services v. Russo, didn’t directly challenge Roe v. Wade, the 1973 decision that legalized abortion nationwide. Instead, the justices had to consider the constitutionality of a Louisiana abortion restriction that sought to ban doctors from performing abortions unless they have “admitting privileges” at a hospital within 30 miles. Had that law gone into effect, it threatened to close all but one of the Southern state’s abortion clinics, according to court records.

In the majority opinion, Justice Stephen Breyer agreed with a lower court’s finding that the Louisiana law would make it unconstitutionally difficult for women to get abortions. He pointed out that women who wanted abortions would likely have to drive several hours to get a procedure that remains constitutionally protected.

“The impact of those increases would be magnified by Louisiana’s requirement that every woman undergo an ultrasound and receive mandatory counseling at least 24 hours before an abortion,” wrote Breyer, who was joined by Justices Ruth Bader Ginsburg, Sonia Sotomayor, and Elena Kagan. “Both experts and laypersons testified that the burdens of this increased travel would fall disproportionately on poor women, who are least able to absorb them.”

Still, advocates on both sides of the abortion debate viewed the case as a test of the court’s willingness to preserve Roe, especially because the case threatened to effectively erase the precedent set by a recent abortion rights ruling. In 2016, in Whole Woman’s Health v. Hellerstedt, the Supreme Court struck down a Texas law that was virtually identical to Louisiana’s law.

If the justices had upheld the Louisiana restriction, just four years after Whole Woman’s Health, abortion rights activists feared that the nearly 50-year-old Roe would have dim chances of survival.

Instead, the Supreme Court found that the similarities to Whole Woman’s Health meant that the Louisiana restriction was also unconstitutional.

“This case is similar to, nearly identical with, Whole Woman’s Health. And the law must consequently reach a similar conclusion,” wrote Breyer, who also wrote the majority opinion in Whole Woman’s Health.

The liberal wing of the court edged out the conservatives thanks to Chief Justice John Roberts, who didn’t join the liberals outright but instead issued his own, concurring opinion. Out of respect for precedent, he ruled, the Louisiana abortion restriction had to go.

“I joined the dissent in Whole Woman’s Health and continue to believe that the case was wrongly decided. 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 wrote. “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.”

Though Roberts is historically a conservative, he’s also deeply concerned with preserving the court’s legacy as an apolitical institution. This case marks the third time in recent weeks that Roberts has joined the liberals to give them an enormous win. He also backed rights for LGTBQ workers and helped preserve the Deferred Action for Childhood Arrivals (DACA), an Obama-era immigration program that allowed nearly 700,000 so-called “Dreamers” to live and work in the U.S. after being brought to the country as children.

Cover image: Anti-abortion protesters wait outside the Supreme Court for a decision, Monday, June 29, 2020 in Washington on the Louisiana case, Russo v. June Medical Services LLC. (AP Photo/Patrick Semansky)