Indian Prime Minister Narendra Modi's Hindu-nationalist party suffered a setback Sunday when it lost a fiercely contested state poll.

Over the past month India held its biggest democratic exercise in two years, with 175 million people eligible to vote in five regional elections.

But the marathon polls involved huge rallies where many attendees were maskless, and a record-breaking coronavirus spike coincided with the final phases of voting.

Experts blame complacency about the pandemic, as well as religious festivals attended by millions of devotees and political rallies, for the virus crisis.

The most important election was in the eastern state of West Bengal, home to 90 million people.

Supporters celebrate the TMC's lead in the West Bengal state elections
Supporters celebrate the TMC's lead in the West Bengal state elections AFP / -

Modi and his right-hand man, Home Minister Amit Shah, campaigned heavily in the state as they sought to end a decade of rule by firebrand leader Mamata Banerjee.

But as results started trickling in, they showed Banerjee's Trinamool Congress (TMC) party on course for a third term.

Thousands of TMC supporters took to the streets, despite a virus-related ban on celebrations.

In a victory speech later Sunday, 66-year-old Banerjee said West Bengal's "immediate challenge is to combat the Covid-19 and we are confident that we will win".

"This victory has saved the humanity, the people of India. It's the victory of India," Banerjee, a fierce critic of Modi, added.

A record-breaking coronavirus spike coincided with the final phases of voting
A record-breaking coronavirus spike coincided with the final phases of voting AFP / SAJJAD HUSSAIN

Modi tweeted his congratulations but added that his party had grown its support in the state "from a negligible presence earlier".

Banerjee however lost her seat in Nandigram to a former confidant who defected to Modi's Bharatiya Janata Party (BJP).

She vowed to challenge the loss in court. She can still be sworn back in as chief minister, but has to be elected in another constituency within six months.

Earlier, polling for two constituencies was postponed after two candidates died of Covid-19.

Despite the defeat in West Bengal, there was a silver lining for the BJP "in the sense that it has now established itself as the principal opposition to the TMC," political strategist Amitabh Tiwari told AFP.

But it was also a setback since the party's top leadership put "a lot of political capital into the state, they did a lot of rallies... it was perceived to be a close contest and some of the opinion polls were saying that the BJP could win there."

The BJP retained the northeastern state of Assam.

In Puducherry -- a small former French colony previously known as Pondicherry -- the BJP was expected to come to power through an alliance amid efforts to increase its presence in the country's south, where it has been traditionally weak.

And in the southern state of Tamil Nadu, M.K. Stalin returned his DMK party to power after a decade by defeating an incumbent coalition that has the BJP as its national partner.

In Kerala in the south, where the BJP until now has played only a bit part, a left-wing alliance retained power with a comfortable victory over a Congress-led coalition.

It was the first time a government in the state had been re-elected since 1977.