In a decisive victory for supporters of abortion rights, the U.S. Supreme Court struck down tough restrictions on abortions in Texas that have halved the number of clinics in the state that provide the procedure.

The 5-3 ruling on one of the most divisive issues in the country came at the end of the current term with only eight justices taking part. The challenge to the Texas regulations was one of the most important abortion cases in 25 years.

The Texas law requires clinics that provide abortions to meet the same building standards as walk-in surgical centers and doctors performing abortions to have admitting privileges at nearby hospitals.

"We conclude that neither of these provisions offers medical benefits sufficient to justify the burdens upon access that each imposes," Justice Stephen G. Breyer wrote for the majority.

Each violates the Constitution, he wrote.

[NATL] Top News Photos: Pope Visits Japan, and More

After Texas passed the new regulations in 2013, the number of clinics dropped from 42 to 19 and was predicted to fall further to fewer than 10.

Hillary Clinton called the decision a victory for women across America and said, "Safe abortion should be a right—not just on paper, but in reality."

"This fight isn't over: The next president has to protect women's health," the presumptive Democratic nominee for president tweeted. "Women won't be 'punished' for exercising their basic rights."

President Barack Obama said that it was clear that the regulations harmed women's health.

"We remain strongly committed to the protection of women's health, including protecting a woman's access to safe, affordable health care and her right to determine her own future," he said in a statement.

SCOTUS's decision is a victory for women in Texas and across America. Safe abortion should be a right—not just on paper, but in reality. -H — Hillary Clinton (@HillaryClinton) June 27, 2016

Breyer was joined by Justices Anthony Kennedy, Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan.

Chief Justice John G. Roberts Jr., Clarence Thomas and Samuel A. Alito Jr. dissented.

Thomas, citing an earlier abortion case heard by the Supreme Court, wrote that the decision exemplified, "the Court's troubling tendency 'to bend the rules when any effort to limit abortion, or even to speak in opposition to abortion, is at issue.'"

Former Texas state Sen. Wendy Davis, who held a filibuster to try to block Republicans from passing it in 2013, said she was overjoyed at the ruling.

"It's incredible news for the women of Texas," Davis said on MSNBC. "It's incredible news for the women throughout this country."

Texas Attorney General Ken Paxton decried the decision and said that the regulations were an effort to improve minimum safety standards and ensure capable care.

"It’s exceedingly unfortunate that the court has taken the ability to protect women's health out of the hands of Texas citizens and their duly-elected representatives," he said in a statement.

When the court heard the case, Whole Woman's Health v. Hellerstedt, in March, Kennedy seemed to want more information about the law's effects on women.

Supporters of the restrictions said they were passed to improve the safety of clinics. Opponents said this law and others were intended to block access to abortion. The new requirements will make abortions more expensive but not safer, they said.

"The record ... contains evidence indicating that abortions taking place in an abortion facility are safe—indeed, safer than numerous procedures that take place outside hospitals and to which Texas does not apply its surgical-center requirements," Breyer wrote in the opinion.

The Center for Reproductive Rights said that complications from abortions were unusual and that patients rarely required hospitalization.

"We are thrilled that these dangerous provisions have been struck down," Planned Parenthood President Cecile Richards said in a statement. "This is a win for women. Every person must have the right to make their own personal decisions about abortion, and we will fight like hell to ensure they do."

A federal appeals court had upheld the Texas law. A tie would have left it in place.

In recent years, the abortion battle has turned to a focus on such requirements as mandatory counseling, waiting periods and ultrasounds. About a dozen other states, including Arkansas, Kansas, Louisiana and Mississippi have laws similar to the Texas one, some of which have been on hold pending court challenges.

"They're all overturned," said Sara Rosenbaum, a professor of health law and policy at George Washington University.

Other states could try to distinguish their laws from the one that got rejected in Texas but the court did not parse the particular standards of surgical centers that it considered burdensome, she said.

"So if you have one of these laws, that is a burden because there is no sense in making an abortion clinic doing early abortions to have to meet surgical facility standards," she said. "To the extent that other states try to wiggle out, I think the court's decision basically shuts that door."

Drew Halfmann, an associate professor of sociology at the University of California Davis, said the dismantling of those laws will take place piece by piece as abortion-rights advocates sue. He said Monday's decision is indicative of a shift in focus.

"There is now this idea that it should be evidence-based when referring to what is good for women's health as opposed to what legislatures think is right," he said.

Twenty-five states have other sorts of facilities requirements and what happens to them will be even more interesting, he said.

The next battle will come as Democrats try to take control of state governments, he said. Twenty-two states now have a Republican governor and Republicans in charge of both houses of the legislature compared to just eight controlled by Democrats.

"That is where these laws are being passed," he said.

The Supreme Court in the 1992 case "Planned Parenthood v. Casey" said that state laws could not create an "undue burden" on a woman's right to an abortion before the fetus becomes viable. Laws whose purpose is to place substantial obstacles to a woman's ability to get an abortion impose such a burden.

Kennedy helped to craft the opinion in Casey but also wrote the majority opinion in a 2007 case in which the court affirmed Congress’ right to enact a partial birth abortion ban given "a legitimate interest in regulating the medical profession."

The ruling in Casey and the 2007 case, Gonzales v. Carhart, formed the basis of the 5th U.S. Circuit Court of Appeal's decision last June that the Texas law was constitutional. The court ruled that the law did not create a substantial obstacle because clinics were given a proper window to comply with the standards and because, in the event certain clinics were forced to close, there were enough other clinics available.

The death of Justice Antonin Scalia in February has left his seat empty. The U.S. Senate has refused to act on Obama's nomination of Merrick Garland to replace him.

Read the Opinion Here