On 1 January, in one of the biggest movements for women’s rights in India, 5 million women lined up across the length of the southern state of Kerala to “uphold Renaissance values”. What they were demanding was an end to violent agitations against women trying to enter Kerala’s Sabarimala temple, a popular Hindu pilgrimage site. This followed a ruling by the Indian supreme court in September, which forced the temple’s doors open to women of all ages in a sensational blow to religious tradition.

“Where a man can enter, a woman can also go. What applies to a man, applies to a woman,” the bench said in its judgment. Since 1991, the temple has accepted only men and older women, in their millions every year, to preserve the mythological celibacy of the ruling deity, Ayyappa. In theory, the court order only reinforced Indian women’s constitutional right to enter places of worship as freely as men, but in practice it wreaked mayhem. Between 17 November and 24 December, more than a dozen women of menstrual age, including reporters, tried to enter the temple but were stopped, shoved and stoned by mobs of male devotees. None of the women could make it in, despite police protection and prohibitory orders. Both sides are far from giving in. Protests have since continued, though most women who were sent back by the mobs have vowed to return.

Protests break out in India after two women enter temple Read more

This isn’t merely a gender war, however. The tussle over the temple entry emphasises various other fractures: faith and state, government and judiciary, secular liberalism and religious populism. Consider the fact that Amit Shah, the president of the Bharatiya Janata party (BJP) – India’s ruling party – said the courts should desist from giving orders “that break the faith of people and cannot be implemented”. Consider also the resonating statement by his vocal opponent, the Congress party’s Shashi Tharoor, who is a member of parliament from Kerala: “For a secular institution like the court to engage in a theological exercise as to what aspect of faith or belief is an ‘essential religious practice’ is problematic.”

The wider debate Sabarimala has thrown up is between the logic in granting women entry to one of India’s most popular temples at a time when they have the same rights as men in most arenas, and the dangers of a court imposing a social reform for which the intended society is far from prepared.

Play Video 1:35 Protests break out in India after two women become first to enter Sabarimala temple - video report

That neither of India’s two biggest parties can openly support the women’s constitutional right to enter a temple confirms the country’s complicated realities. If the legend of Ayyappa’s celibacy is sacred to his devotees, and therefore worthy of exemption from state intervention, then similar appeals from believers of other faiths should hold equal weight – for instance some sections of India’s Muslim society have appealed against the Indian government’s continuing strikedown of “triple talaq”, which allows Muslim men to instantly divorce their wives.

It’s even trickier to predict whether the courts’ interference in religion will always be a force for good. The most contentious case before the supreme court at present is the matter of Ayodhya, where the Hindu nationalist forces – including the BJP – want to build a temple on a site that the Hindus believe to be the birthplace of the deity Ram. Their belief is strong enough to have led 150,000 of them to demolish a 16th-century mosque, Babri Masjid, in 1992. As Hindu nationalist fervour peaks, ahead of 2019’s parliamentary elections, the consequences of a decision in the favour of religious belief could be climactic.

Indeed the best way for women of menstrual age to enter Sabarimala would be through bottom-up social and religious reform. The most stinging critique of the supreme court order came from a survey that showed 75% of people in Kerala disagreed with the decision. Claims were also made that the interests of a handful of leftist activists trying to enter the temple were at odds with the beliefs of the majority of Kerala’s ordinary women, who preferred the status quo.

But the sight of the 385 mile (620km) “women’s wall” – one of the largest ever congregations of women in the world – has rekindled hopes for a genuine movement. Standing shoulder-to-shoulder along the highways was a wide range of women – young and old, rural and urban, farmers and doctors, activists and actors – taking the pledge to fight for gender equality. Early the next morning, two women – Bindu Hariharan (42) and Kanaka Durga (44) – went to Sabarimala. They had visited the temple on 24 December, but were prevented from entering by rioting protesters. They had said they would get in – and sure enough, on this occasion, they got in.

• Snigdha Poonam is a national affairs writer at the Hindustan Times and the author of Dreamers: How Young Indians Are Changing the World