Millions of women have formed a human chain spanning 620km (400 miles) in support of women’s rights in India, as two female worshippers became the first to enter a Hindu temple that has traditionally banned them from entry.

The ban on women “of menstruating age” from the Sabarimala temple in Kerala has become a flashpoint in a national argument over gender equality and religious freedoms. Despite a Supreme Court ruling in September to lift the ban, devotees have amassed in their thousands to keep women out by force.

In the most dramatic display of support yet for women’s right to worship wherever they choose, millions gathered to form a “women’s wall” stretching from Kasargod in the northern part of Kerala to Thiruvananthapuram, the southernmost city and the state capital.

The ruling party in the state, the left-wing Communist Party of India (Marxist), said about 5.5 million participated in the protest, called by the state government on Tuesday.

Then, under the cover of darkness in the early hours of Wednesday, two women in their forties made the two-hour trek up to the hilltop Sabarimala temple and prayed there under police guard.

Kerala’s chief minister Pinarayi Vijayan confirmed they were the first two women to reach the temple unimpeded by devotees since the lifting of the ban three months ago. The same two women had, like many others, made previous unsuccessful attempts.

The temple authorities say women are banned at Sabarimala because they might tempt its primary deity, Lord Ayyappa, from his vow of celibacy. Others see women of menstruating age – interpreted as anyone between 10 and 50 – as impure, and there were reports that priests shut the temple for two hours to carry out “purity rituals” once the women had left.

“Earlier, women were not able to enter the temple due to certain hurdles. They were able to enter the shrine today,” Mr Vijayan said.

Protestors block traffic and shout slogans after hearing reports of the two women entering the Sabarimala temple (AP)

The issue has unusually united India’s two main national political parties – Narendra Modi’s ruling BJP and the opposition Congress – which have both called for the temple’s religious customs to be respected.

CPI (Marxist) has stated that it has no choice but to comply with the Supreme Court’s orders, which stated that restrictions like those put in place by the Sabarimala temple “can’t be held as essential religious practice”.

The then chief justice Dipak Misra said in his ruling that 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.

Nonetheless, there was a swift backlash on Wednesday to the news that women had prayed at the temple for the first time. Protests were hastily arranged across the state, and police said they fired tear gas to disperse at least one.The possibility of more confrontations was raised by a call from an umbrella group of right-wing Hindu groups in Kerala, the Sabarimala Karma Samithi, which is supported by the BJP, for a state-wide protest strike on Thursday.

The BJP called for protesters to be peaceful. Earlier, the party’s local leader described the women’s visit as “a conspiracy by the atheist rulers to destroy the Hindu temples”.

BJP state president PS Sreedharan Pillai told TV channels the party would “support the struggles against the destruction of faith by the Communists”. He said: “Let all the devotees come forward and protest this.”

And K Sudhakaran, vice-president of the local arm of Congress, said: “This is treachery ... the [state] government will have to pay the price for the violation of the custom.”

The two women themselves have been placed in police protection, though they have been identified as Bindu Ammini, 42, and Kanaka Durga, 44.

Support free-thinking journalism and attend Independent events

Ms Ammini told a TV channel how they were able to avoid devotees on a stealthy trek through the night. “We reached Pampa, the main entry point to the temple at 1.30am and sought police protection,” she said.

“We walked two hours, entered the temple around 3.30am and did the darshan,” she added, referring to a ritual of prayer in front of the temple’s Hindu image.

Religion has become one of the main topics of debate ahead of India’s general election in the spring. In a rare interview with the ANI agency on Tuesday, the prime minister said he believed the temple issue was more about a religious tradition than gender equality.