NEW DELHI — India’s governing party and its allies won a majority of seats in a tight race for power in the state of Bihar, according to results early Wednesday, in the first major election in the country since the coronavirus pandemic began.
In a post on Twitter near midnight, Prime Minister Narendra Modi declared that his Bharatiya Janata Party and its coalition partners had triumphed, saying, “Democracy has once again won in Bihar.” Votes were still being counted for a last few seats, but by early Wednesday, the B.J.P. and its allies had secured more than enough seats for a majority, and a clear path to forming a state government.
The result was a stunning reversal in an election in which exit polls heavily favored the opposition parties, and in which Mr. Modi personally and heavily campaigned to try to reverse disappointments for his party in recent months.
Despite a long stretch of plummeting economic indicators and a sharply rising coronavirus caseload that has put India only behind the United States in total cases, political analysts saw the result as proof that Mr. Modi has retained his popularity and can still rely on his Hindu-nationalist base.
Across the country, Indians were riveted by live TV coverage, waiting to see how India’s governing party would fare in what has been widely seen as a referendum on its handling of the pandemic. Around 41 million votes were cast, with the process slowed because of pandemic social distancing measures at voting and counting stations.
Bihar, India’s third-most-populous state, has been hit hard by the coronavirus and a lockdown that drove up its already high levels of youth unemployment. An electoral backlash had been expected against the incumbent chief minister, Nitish Kumar, and his Janata Dal, or People’s Party.
Seeing a chance to turn his party’s fortunes around, however, Mr. Modi formed a coalition with Mr. Kumar’s party and then prioritized the campaign in Bihar, appearing in the state at least four times, in 12 separate campaign events, in recent weeks.
“It just shows that people still repose faith in Prime Minister Modi,” said Arati Jerath, an Indian journalist and political commentator.
Regardless of whether the B.J.P. secures enough seats to form a government with its coalition partners, a significant gain in seats would represent an important win for the party in a state with a well-organized opposition, experts said.
Bihar is a poor state where most people eke out a living in agriculture, forestry and fishing. In campaigning for the alliance between the B.J.P. and People’s Party there, officials emphasized the B.J.P.’s national achievements, including the recent Supreme Court decision that gives Hindus the right to build a temple on the site of a mosque that was destroyed by Hindu rioters decades ago. Mr. Modi set the ceremonial cornerstone for the temple, at Ayodhya, in August.
“The Bihar elections confirm that voters do not seem to attribute direct responsibility to the prime minister for the mishandling of national affairs, such as the economy or the pandemic itself,” said Gilles Verniers, a professor of political science at Ashoka University, near New Delhi.
Mr. Verniers called the B.J.P.’s performance — in light of Bihar’s ongoing struggles with the pandemic — “remarkable.”
Polls had predicted a big win for Mr. Kumar’s 31-year-old challenger, Tejashwi Prasad Yadav of the Rashtriya Janata Dal, or National People’s Party. Mr. Yadav focused on an issue of particular importance to Biharis: the lack of jobs for young people. The youth unemployment rate in 2018 and 2019 in Bihar was nearly 31 percent, compared with 17 percent nationwide.
Mr. Yadav was able to capture the imagination of the mainly young electorate with a pledge to create a million new jobs. Exit polls strongly favored Mr. Yadav’s coalition, which includes India’s main opposition party, Congress.
Mr. Modi, however, took the fight directly to Mr. Yadav, campaigning heavily in Bihar and casting the young coalition leader as “jungle raj ke yuvraj,” or the prince of an era of lawlessness, in a reference to his parents’ rule of Bihar.
Mr. Yadav’s father, Lalu Prasad, who served one and a half terms, beginning in 1990, has been in and out of prison for years on corruption charges. He is incarcerated at a hospital in Ranchi, a city in neighboring Jharkhand State. While under investigation for embezzling public funds in 1997, he appointed his wife, Rabri Devi, as chief minister. She remained in power until 2005.
Experts have estimated that the economic collapse caused by the pandemic and a lockdown earlier this year, which led to the return of millions of migrants, may have sent youth unemployment above 40 percent in the state.
Bihar, where health care is limited, has particularly suffered in the pandemic as the lockdown ordered by Mr. Modi in March sent migrant workers back to their ancestral villages in droves.
Many of those who had migrated to big Indian cities for work were forced to return home, often on foot, since public transportation was suspended. Others who had planned to set out for seasonal work also missed out on the opportunity to earn income, said Varun Aggarwal, founder of the Mumbai-based advocacy group India Migration Now.
“There is a longer-term silent disaster for people who couldn’t migrate” in Bihar, Mr. Aggarwal said.
India’s new virus infections have dropped dramatically in recent weeks from its September highs of nearly 98,000 new cases a day. But experts warn that cold weather, toxic air pollution caused by the burning of paddy fields to clear them of stubble, and the Hindu festival of Diwali this month could fan a resurgence in cases.