TMC supporters have been celebrating after being returned to power in West Bengal
Indian Prime Minister Narendra Modi's party has failed to win a key state in elections held amid record Covid-19 deaths and cases.
The BJP targeted West Bengal heavily during campaigning but the state was comfortably held by the incumbent, Mamata Banerjee, a fierce Modi critic.
Her win came as a surprise to political observers, who noted how much time and money the BJP invested in the state.
Mr Modi was even accused of focusing on polls rather than the pandemic.
Despite the defeat, the BJP won nearly 80 seats to become the main opposition party. In the 2016 vote, Narendra Modi's party won just three seats there.
Elections also went ahead in Assam, Tamil Nadu and Kerala states as well as the territory of Pondicherry (Puducherry).
The BJP held power in the north-eastern state of Assam but failed to make major gains elsewhere.
For 10 straight days, daily cases in India have topped 300,000. It recorded more than 360,000 new cases and 3,417 deaths on Monday. On Sunday, the country set a new record for daily deaths, with 3,689 recorded. Hospitals are facing dire shortages of beds and medical oxygen, with many Indians resorting to desperate pleas on social media to secure help.
Campaign rallies and voting have been blamed for the surge in cases.
Mr Modi and his home minister made dozens of speeches in West Bengal and were accused of focusing on the polls rather than the pandemic.
What happened in West Bengal?
With almost all the results counted, the Trinamool Congress party (TMC) led by the state's Chief Minister Mamata Banerjee has won more than 200 seats in the 294-seat assembly.
The results are set to make Ms Banerjee the leader of West Bengal for a third time. She is also India's only female chief minister.
Celebrating the win, she said West Bengal had "saved" India with the result and tackling Covid-19 would be her first priority.
Mamata Banerjee has been a fierce critic of Prime Minister Modi
Victory was soured by the loss of her seat in Nandigram to a former aide turned defector to the BJP. She has said she will challenge the result in court but may have to run again to remain chief minister.
West Bengal, home to 90 million people and the city of Kolkata, is of particular interest to election watchers. It is one of the few states that have never been governed by Mr Modi's Hindu nationalist BJP.
Analysis box by Geeta Pandey, Editor, India women and social affairs
Although assembly elections were held in five Indian states, the real battle was over West Bengal.
The BJP had pulled out all the stops for electioneering, with PM Narendra Modi leading its campaign from the front.
To enhance his appeal further to the Bengali voter, he had grown his beard long, with his supporters drawing comparisons with the state's much loved icon - Nobel Prize-winning poet Rabindranath Tagore.
But in the end, it all came to nothing.
At a time when a deadly second wave of coronavirus swept India and led thousands of Indians across the country to beg for hospital beds and oxygen cylinders, Mr Modi's frequent visits to the state to address huge rallies were called out as a major failure of his prime ministerial duties.
So Mamata Banerjee fought back anti-incumbency, the BJP's mammoth election machinery, last-minute desertions from within her own party, and a largely unfriendly media to return for a third term.
Congratulating Ms Banerjee in a tweet, Mr Modi also noted: "From a negligible presence earlier [in West Bengal], BJP's presence has significantly increased."
Leader of the opposition Congress party Rahul Gandhi congratulated Ms Banerjee for "soundly defeating the BJP" even though his party lost a significant number of seats in the state.
We humbly accept the people’s mandate.
Sincere gratitude to our workers & the millions of people who supported us on the ground.
We will continue to fight for our values and ideals.
— Rahul Gandhi (@RahulGandhi) May 2, 2021
He was among a number of regional opposition leaders to revel in Ms Banerjee's win.
Heartiest congratulations to @MamataOfficial ji for her big win in West Bengal as she stood against all possible means to defeat her.
The people of West Bengal indeed have to be congratulated for their fearless and clear stand in these elections. @AITCofficial
— Aaditya Thackeray (@AUThackeray) May 2, 2021
Congratulations @MamataOfficial didi for landslide victory. What a fight!
Congratulations to the people of WB
— Arvind Kejriwal (@ArvindKejriwal) May 2, 2021
Social media was flooded with memes and posts about the success of "Didi" - a nickname for Ms Banerjee, meaning older sister.
Voting in the state was held in eight phases over a month. The Election Commission is facing a great deal of criticism for refusing to reduce the number of phases and make campaigning virtual. Critics have accused the commission of being controlled by the BJP.
A number of congratulatory tweets noted that the TMC had won "despite" the commission.
As well as the north-eastern states of West Bengal and Assam, there was voting in the southern states of Tamil Nadu and Kerala, the South Indian union territory of Pondicherry, and local council elections in some parts of Uttar Pradesh in the north and Telangana in the south.
In Tamil Nadu, the main regional opposition party, the DMK, took power. A left-wing coalition retained power in Kerala, while a BJP-led alliance won no seats there.
On top of the coronavirus pandemic, some analysts saw the results as showing the limits of the BJP's rhetoric in states with sizeable Muslim populations.
What are India's latest Covid figures?
India has recorded more than 19 million cases of coronavirus - second only to the US. It has also confirmed more than 218,000 deaths, though the real toll is thought to be far higher.
Experts have cited low testing rates and the number of people dying at home, especially in rural areas, as contributing factors to under-reported figures.
The country's previous highest daily death toll, also reported this week, was 3,645.
Chart shows cases and deaths in India
The head of the world's largest vaccine manufacturer, the Serum Institute of India, which manufactures the AstraZeneca vaccine, has blamed India's government for the shortage of Covid jabs.
Adar Poonawalla told the Financial Times that initially Narendra Modi's government only ordered 21 million doses, and a larger order was not placed until March, when the second wave of the pandemic had already hit India. The country has a population of 1.3 billion people.
In a separate statement, Mr Poonawalla said the Serum Institute of India has now received a total order of more than 260 million doses.
Brazil and the US have both registered daily tolls of more than 4,000 during the course of the pandemic.
In India, distressing images of families begging for hospital beds and life-saving supplies have been emerging for more than 10 days, while morgues and crematoriums remain overwhelmed.