India’s top court ruled this week that non-Hindu minority communities, including Muslims and Christians, can now adopt children with full rights as natural parents.

A bizarre quirk in the Indian law — aimed at reconciling the various beliefs and practices of different communities — had meant that only Hindus (and breakaway religious communities like Buddhists, Jains and Sikhs) were previously allowed to properly adopt minors. Non-Hindus could only act as guardians or foster parents, both of which restrict the child’s right to inherit.

(MORE: In Bihar, a Village Struggles to Come to Terms With School Deaths)

In truth, the state gave non-Hindus full rights to adopt almost a decade ago. However, objections that Sharia law doesn’t recognize adoption, raised by the Muslim personal board in 2006, meant the issue remained shrouded in confusion.

On Wednesday, the court, acting on a petition by Muslim social activist Shabnam Hashmi, finally struck down the objection and made clear that any person can adopt a child irrespective of their religion, and even if the personal laws of their faith forbids it. (Hashmi first challenged the law in 2005 when she became guardian to a one-year-old girl.)

“The [Juvenile Justice] Act 2000 is a secular law enabling any person, irrespective of the religion he professes, to take a child in adoption,” said the judgment, stressing that while personal beliefs are important, they cannot dictate the “operation of the provisions of an enabling statute.”

“In many parts of the country, adoption was not being done even after 2006. Courts were very confused,” says Colin Gonsalves, a human rights lawyer who represented Hashmi. “This judgment strengthens the secular law while making it clear that it is an enabling law. There is no compulsion on any community to follow it.”

Experts are optimistic that this ruling will bring fresh hope for around 12 million Indian orphans. The adoption rate in India is dismally low with only around 4,000 children finding new families each year.

“Now the doors are open for all communities to adopt and as the judgment is reported throughout the country adoption rates will go up,” says Gonsalves. “We are happy now because there are millions of orphan children waiting for a home.”

MORE: India’s Rent-a-Womb Industry Faces New Restrictions

Contact us at letters@time.com.