It’s the first major abortion ruling for the high court under its new majority of members who have track records opposing abortion rights, and a potentially defining moment in President Donald Trump’s presidency after he appointed two conservative justices to the bench. Trump promised to name only justices who would oppose abortion in all cases.

It comes as Trump is trying to secure re-election and polls show him trailing his rival Joe Biden, the presumptive Democratic nominee who supports abortion rights. Trump has frequently touted his opposition to abortion, and plans to eliminate or significantly restrict access, on the campaign trail. He has said he will only nominate Supreme Court justices who agree with his position, so the ruling this week could provide new fodder for him on the matter.

Trump’s two appointees, Justices Neil Gorsuch and Brett Kavanaugh, both voted that the Louisiana law should stand, but were overruled with a 5-4 majority against the law.

During arguments, the court’s four liberal judges appeared to agree that the law was identical to a Texas law that the court struck down four years ago. The court decided the Louisiana law goes too far in presenting new hurdles for people seeking abortions.

Louisiana already bans abortion after 20 weeks and requires two doctors’ visits, 24 hours apart, before a pregnancy termination can be performed.

The law at the center of the court ruling also would require that any doctor performing an abortion have admitting privileges at a hospital within 30 miles of the clinic. It overwhelmingly passed the Louisiana Legislature in a bipartisan vote in 2014, but never went into effect pending legal challenges.

Louisiana leaders have argued that the law is meant to protect women.

But the admitting privileges law has been seen as a test case for even further restrictions as states try to erode abortion rights protections given through the court’s 1973 Roe v. Wade ruling.

Laws making their way through the courts include one in North Dakota—and copied by other states—that would ban abortion after a fetal heartbeat can be detected, or at about six weeks.

According to the Center for Reproductive Rights, which advocates for abortion access, abortion likely would be banned in 24 states if Roe were to be upended or significantly weakened by the court.

That the court ruled against the law signals a major upheaval of Roe is less likely to happen.

It also sets a new precedent for who can challenge abortion restrictions. One of the components of Louisiana’s challenge was that outside groups, like the Center for Reproductive Rights on behalf of abortion providers, didn’t have standing to file a lawsuit.

Abortion rights cases often are filed by the doctors instead of the patients because of the timeliness and broader issue, but the Louisiana Attorney General, Jeff Landry, instead argued that shouldn’t be allowed.

On that issue, which hadn’t come up in previous abortion cases, the court ultimately decided that providers could sue on behalf of patients.

Supporters of the law have argued that it’s meant to protect health of women.

“We introduced this law with then Rep. Katrina Jackson to protect the health and safety of women at for-profit abortion businesses,” Louisiana Right to Life Associate Director Angie Thomas said in a statement this month. “The Louisiana abortion industry, with its long history of health and safety violations, cannot speak for Louisiana women.”

Opponents, meanwhile, argued that its goal was to eliminate access to abortion and could have sweeping implications for the debate over the future of reproductive rights in the country.

“We should not have to refight legal battles that we’ve already won, but states like Louisiana are in open defiance of the Constitution and the Supreme Court’s rulings,” said Center for Reproductive Rights CEO Nancy Northup in a statement. “It’s alarming and unacceptable that in 2020, some states are still hell bent on denying women access to reproductive healthcare.”