NEW DELHI -- India's Supreme Court ruled on Thursday that all women, regardless of marital status, can obtain abortions up to 24 weeks into their pregnancies.

Previously, under India's abortion law, married women could have abortions up to 24 weeks into their pregnancies, but single women were limited to 20 weeks. On Thursday, the court extended the 24-week period to all women.

The judgment was cheered by reproductive rights activists, who said the court had ensured that the law does not discriminate and expands the right to safe and legal abortions to single women.

"Now, all the rights that married women have, single women will also have," said Aparna Chandra, an associate professor of law at the National Law School of India, who works on reproductive justice. In its judgment, the court "breaks away from the stigma that is attached to single women getting pregnant," she said.

Abortion has been legal in India since 1971 under the Medical Termination Pregnancy Act. In 2021, the law was amended to allow certain categories of women -- including married women who were divorced or widowed, minors, rape victims or mentally ill women -- to obtain abortions up to 24 weeks, raising it from the previous 20 weeks. But the changes did not include single women, causing many to question why the law differentiated on the basis of marital status.

"The artificial distinction between married and unmarried women cannot be sustained. Women must have autonomy to have free exercise of these rights," Justice Dhananjaya Y. Chandrachud said.

The court said denying single women the same access to abortion violated the right to equality before the law under India's Constitution.

Abortion rights have been a contentious issue across the world, especially after the U.S. Supreme Court in June overturned the Roe v. Wade judgment which had established a constitutional right to abortion in the country.

"Internationally, judgments affect each other -- and this is a landmark one because it recognizes a woman's right over her body and reproductive freedom regardless of what governments and legislatures might say," said Supreme Court lawyer Karuna Nundy.

The ruling came after an unmarried woman in a consensual relationship was denied an abortion by a lower court in July because she was past 20 weeks in her pregnancy. Later that month, the Supreme Court allowed her to get an abortion up to her 24th week of pregnancy, and on Thursday extended that right to all women.