The US Supreme Court has struck down a contentious abortion law in the state of Texas that imposed strict regulations on the procedure that made it harder for women to get an abortion.

Access Restricted: Abortion in Texas

In the court's biggest abortion case in nearly a quarter of a century, justices voted 5-3 on Monday in favour of Texas clinics that protested against the regulations.

Justice Stephen Breyer's majority opinion for the court held that the regulations are medically unnecessary and violated a woman's constitutional right to obtain an abortion.

Breyer wrote that "the surgical-centre requirement, like the admitting privileges requirement, provides few, if any, health benefits for women, poses a substantial obstacle to women seeking abortions and constitutes an 'undue burden' on their constitutional right to do so".

READ MORE: Texas abortion clinics - How far is too far to drive?

The rules required doctors who perform abortions to have admitting privileges at nearby hospitals and that abortion clinics must be fitted with hospital-like surgical centres.

The law effectively forced dozens of abortion clinics in the state to close, with the number of providers shrinking from 41 to seven, most of them located in major cities.

Many clinics are now expected to reopen.

Texas had argued that its 2013 law and subsequent regulations were needed to protect women's health.

Al Jazeera's Patty Culhane, reporting from Washington DC, said the Supreme Court ruling was a "massive victory" for people campaigning for abortion rights.

"As the Supreme Court finally waded into this issue after nearly 10 years of silence … there were a lot of people who thought that this would come down to a split decision, with four Conservatives and four Liberals on the court. But the swing vote by Conservative Justice Anthony Kennedy, and his decision to side with the Liberals, effectively ended this issue."

President Barack Obama welcomed the ruling.

Some US states have pursued a variety of restrictions on abortion, including banning certain types of procedures, prohibiting it after a certain number of weeks of gestation, requiring parental permission for girls until a certain age, imposing waiting periods or mandatory counselling, and others.

Americans remain closely divided over whether abortion should be legal. In a Reuters/Ipso online poll involving 6,769 US adults conducted from June 3 to June 22, 47 percent of respondents said abortion generally should be legal and 42 percent said it generally should be illegal.

Source: Al Jazeera and agencies