The U.S. Supreme Court upheld abortion rights Monday, ruling that states across the country had no right to curb the constitutional right of women to end their pregnancies by imposing an “undue burden” on them to limit their access to abortion clinics.

The 5-3 decision was perhaps the court’s most important abortion rights ruling in a quarter century.

The majority overturned a law in the southwestern state of Texas, similar to that enacted in other states, that required abortion doctors to have patient-admitting privileges at hospitals near their abortion clinics and that their clinics be equipped with costly hospital-grade healthcare equipment.

Writing for the court majority, Justice Stephen Breyer said that the state’s regulations were medically unnecessary and unconstitutionally limited a woman’s right to an abortion.

“The surgical-center 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,” said Breyer.

President Barack Obama said he was pleased with the decision Monday, noting “every woman has a constitutional right to make her own reproductive choices.” 

The Supreme Court ruling, coming on the last day of the court’s current term before its summer recess, could affect thousands of women in Texas alone, and many more throughout the U.S.