India’s Supreme Court has ruled that religious freedoms cannot be invoked as a “cover” for sexist policies, ordering a historic temple to lift its ban on women “of menstruating age”.

The Sabarimala temple, one of the holiest sites in Hinduism, attracts tens of millions of pilgrims every year but has barred women between the ages of 10 and 50 from entering.

Religious authorities argued the rule was a fundamental part of their belief system, in recognition of the fact that the temple’s presiding deity, Lord Ayyappa, is celibate. Some leaders suggested menstruating women were impure.

But in the latest historic ruling issued by India’s top court in the last few weeks, judges said restrictions like those put in place by the Sabarimala temple “can’t be held as essential religious practice”.

Chief justice Dipak Misra said patriarchal beliefs were not more important than equality in devotion. “Religion cannot 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,” he said.

Though central to the judgement issued on Friday, Sabarimala, nestled among the mountains and dense forests of the Periyar Tiger Reserve in the southern state of Kerala, is not the only temple in India to ban women. The operators of a temple in Rajasthan believe the Hindu god Kartikeya curses women who enter the temple, instead of blessing them.

Two years ago, a Mumbai court ruled it was the fundamental right of women to enter any place of worship that allows men access, and that the state should protect this right. The discussions that followed triggered a wider debate on women’s rights in the country.

Chhavi Methi, a women’s rights activist, hailed the court verdict, but said its acceptance by temple authorities remained to be seen.

“I am doubtful the temple authorities would take it in the right spirit. Women would accept it, but its implementation might pose a problem,” she said.

Temple authorities said they had received support from “other religious heads” and would appeal against the verdict, which was carried by four votes to one on a five-judge panel. Rahul Eswaran, an attorney for the temple, noted girls and women of other ages were allowed in the temple without restrictions.

Justice Indu Malhotra, the lone dissenting judge and the only female on the bench, said: “Religious practices cannot solely be tested on the basis of the right to equality. It is up to the worshippers, not the court, to decide what is the religion’s essential practice.”

The Supreme Court ruling is just the latest in a series being heralded by activists for gay rights, women’s rights and the rights of religious minorities.

On Thursday the court struck down a 150-year-old law that made adultery a criminal offence – but only for the lover of a married woman. It was discriminatory towards men, petitioners argued, and treated women like their husbands’ property.

And earlier this month the court read down a section of the British-enacted Indian Penal Code which made gay sex illegal, affirming the rights of LGBT+ people to equality in the eyes of the law.

The rulings have all been rushed through before the end of Mr Misra’s tenure as chief justice. He will step down on Tuesday, after reaching the state-mandated retirement age for Supreme Court judges of 65.