India’s Supreme Court has lifted a centuries-old ban on women who could potentially be on their periods from entering a popular Hindu pilgrimage site.

Chief Justice Dipak Misra said in the 4-1 ruling Friday that Sabarimala Temple’s restrictions on women could not be considered an essential religious practice.

“All devotees are equal, and there cannot be any discrimination on the basis of gender,” Misra said, according to NDTV.

D.Y. Chandrachud, a Supreme Court justice who concurred with Misra, said that religion can’t be “the cover to deny women the right to worship.”

“To treat women as children of a lesser God is to blink at constitutional morality,” Chandrachud said.

The ruling was the latest in a series of landmark progressive decisions from India’s top court. On Thursday, the court struck down a colonial-era law about adultery. Last month, the Supreme Court decriminalized gay sex.

Shankar/The India Today Group via Getty Images Devotees gather at Kerala's Sabarimala Temple to worship Lord Ayyappa, a Hindu deity.

For centuries, menstruating women have been prohibited from entering the Sabarimala Temple in the southern state of Kerala. The temple is one of the most prominent Hindu temples in the country, attracting up to 50 million pilgrims every year.

Unlike other Hindu temples that just prohibit women on their periods, Sabarimala had a blanket ban on all women of menstruating age, generally ages 10 to 50.

The newest ruling is the result of a petition that has been making its way through Indian courts for years. Activists who wanted the restrictions removed claimed the rule was a remnant of outdated, patriarchal attitudes that treated menstruating women as “unclean.” Those who were for the gender-based ban claimed that it honored the eternally celibate deity that the temple is dedicated to, Lord Ayyappa. Others argued that the restrictions actually protected women, since some believe women’s health would be harmed by the energy at Sabarimala.

The one dissenting voice on the Supreme Court, Justice Indu Malhotra, is also the only woman on the five-member bench. Malhotra argued that “notions of rationality cannot be invoked in matters of religion.”

“Religious practices cannot solely be tested on the basis of the right to equality,” she said, according to Reuters. “It is up to the worshippers, not the court, to decide what is the religion’s essential practice.”

Dipak Kumar / Reuters Hindu pilgrims line up at the Sabarimala Temple to offer prayers to the Hindu deity Ayappa in 2003.

The Travancore Devaswom Board, which manages the temple, has said it plans to seek a review of the Supreme Court decision. The board’s president, A. Padmakumar, told the Press Trust of India on Sunday that he doesn’t think “real women devotees” of Lord Ayyappa will visit the temple when it opens for its annual pilgrimage season on Oct. 16.

“Only some women activists are expected to trek the holy hill in the name of the verdict,” Padmakumar said.

In the meantime, Kerala’s government will be attempting to make the temple more accommodating for female devotees, according to NDTV ― installing separate washrooms and baths and increasing the number of female police officers at the site.

Other Indian religious sites have also been opened up to women through recent court cases. In 2016, the Hindu temple Shani Shingnapur and the Muslim Haji Ali shrine in the state of Maharashtra were both independently ordered to lift their gender-based bans, according to the BBC.

Sadhana, an American coalition of progressive Hindus, called the Supreme Court’s decision an “important and progressive step in removing the stigma around menstruation in Hindu communities.”

“No human is pure or impure in the eyes of god,” the coalition wrote on Facebook. “We are all divine.”