India's Supreme Court has said that all women, including those not married, could get an abortion up to 24 weeks.
The court ruling came on a plea seeking clarity on the amended 2021 abortion law which listed several groups that did not include single women.
The court said all women, regardless of their marital status, were entitled to safe and legal abortion.
It said that excluding single women in consensual relationships would be "unconstitutional".
Abortions have been legal in India since 1971, but over the years authorities have made strict rules for who can terminate a pregnancy because of the abortions of millions of female foetuses, leading to a terribly skewed gender ratio in the country. Traditionally, Indians have shown a preference for male children over daughters.
Last year, the government amended the Medical Termination of Pregnancy Act (MTP) to allow several categories of women to seek abortions between 20 and 24 weeks.
The list included rape survivors, minors, women with mental disabilities, women with foetuses that had major abnormalities and married women whose marital status had changed during the pregnancy.
The judgement on Thursday clarified that the amendment did not distinguish between married and unmarried women and that it must also include unmarried women in consensual relationships.
Does India really have more women than men?
India's preference for sons over daughters remains
The bench, comprising Justices DY Chandrachud, AS Bopanna and JB Pardiwal said a woman's marital status could not be grounds to deprive her of the right to abort an unwanted pregnancy.
The judges also said that under this law, the meaning of rape would include sexual assault by husbands.
India is yet to criminalise marital rape. Under current laws, sex "by a man with his own wife" who's not a minor is not rape.
In May, the Delhi high court had delivered a split verdict in a case seeking to outlaw the British-era law, with the two judges expressing opposing views on the matter.
The case is now being heard in the Supreme Court.
Read more India stories from the BBC:
India official mocks student's sanitary pad request
Moonlighting debate divides Indian firms and workers
Why is India raiding this Islamic group?
India village ends 75-year wait for government job
The Indian state getting a bad rap over stray dogs
Unanswered questions in India sisters' hanging
Apple makes iPhone 14 in India in shift from China