NEW DELHI — Prime Minister Narendra Modi’s governing party suffered a major setback in elections in New Delhi on Tuesday — winning far fewer seats in the capital district’s Legislative Assembly than expected after a bitter campaign that it tried to turn into a referendum on Mr. Modi and his Hindu nationalist platform.
On Tuesday, election results showed that Mr. Modi’s Bharatiya Janata Party, or B.J.P., picked up five more seats in the assembly than it won in the last election here, in 2015. Still, the showing was a major disappointment, falling short of expectations and the seats needed to beat the opposition, the incumbent Aam Aadmi Party, or A.A.P., to take over the critical office of chief minister for Delhi.
Taking over that office was a priority for the B.J.P., amid nationwide anti-government protests against Mr. Modi’s policies that are now entering their third month. Mr. Modi swept national elections last year and quickly set his sights on winning big in the capital.
The protests are directed at the citizenship law passed by Mr. Modi’s government that opponents say discriminates against Muslims. The unrest has posed the biggest challenge yet to the prime minister and has taken on more issues, evolving into an expression of resistance against what many demonstrators see as a long-term plan by his party to redefine India’s secular foundation and turn it into a Hindu-centric state.
Cabinet ministers for Mr. Modi’s party came out in full force during the campaign, using starkly sectarian language to imply that support for the incumbents was like supporting Islamist “terrorism” or committing treason. In the two weeks since one deputy minister implored crowds to “shoot the traitors,” there have been two cases of guns being fired at protesters.
The incumbent A.A.P., or Common Man Party, has a wide base of support, cutting across India’s religious and class divides. It includes many voters who support Mr. Modi’s party in national elections.
During the campaign, the A.A.P. emphasized economic development issues, like health care and education, and on Tuesday it appeared voters rewarded the party for its track record of delivering better services.
“It is clear the people of Delhi have defined the meaning of politics as politics of development,” said Arvind Kejriwal, the A.A.P. leader and chief minister of Delhi, as he claimed victory before a cheering crowd on Tuesday afternoon. “The people of Delhi have said they will vote only for people who will work for schools, clinics and better infrastructure.”
“This victory is the victory of mother India,” he said, saying he hoped his party’s win would change India’s political discourse, moving it away from sectarian issues.
During the campaign, Mr. Modi’s party’s main strategy was to relentlessly focus on issues of sectarian identity, doubling down on the citizenship law and other Hindu-centric initiatives rather than on issues specific to the capital city.
Top officials from the B.J.P. told Delhi’s voters that a vote for the opposing A.A.P. was tantamount to a vote for Pakistan, the Islamic republic and archrival next door. The B.J.P. also tried to brand Mr. Kejriwal as a Pakistani agent who was secretly supporting the protests, working to help Muslims while holding India’s Hindu population back.
India’s information minister, Prakash Javadekar, went even further last week, calling Mr. Kejriwal a “terrorist” during a news conference.
“You are a terrorist and there is plenty of proof,” Mr. Javadekar said, without providing any.
But Mr. Kejriwal, the A.A.P. leader, took a page out of the B.J.P.’s playbook, peddling a softer version of Mr. Modi’s Hindu nationalism.
While the B.J.P. has often pitted the country’s Hindu majority against its minorities, the A.A.P. instead championed religious coexistence and diversity while playing up its own Hindu credentials. Politicians from the A.A.P. visited Hindu temples, sang devotional hymns and avoided talking about the protests, which the B.J.P. has painted as hotbeds of Muslim extremism.
A Hindu himself, Mr. Kejriwal made a point of going straight to temple after his victory speech.
During the campaign Mr. Kejriwal lashed out at the B.J.P., and said the party’s officials were resorting to sectarianism because they had no achievements of their own to point to.
“This is why they want to contest the polls on the plank of Hindu-Muslim and distract people from our accomplishments,” Mr. Kejriwal said in an interview last week with The Indian Express newspaper.
“The time has come to choose what patriotism is,” he said. “Is educating children patriotism or is it stressing on the Hindu-Muslim debate? Is providing affordable health care patriotism or is it Hindu-Muslim?”
Mr. Kejriwal avoided talking about the protests, instead focusing on his party’s achievements and plans for further economic development.
The election results on Tuesday give Mr. Kejriwal a third consecutive victory in campaigns for the chief minister post.
Still, even if the results were a disappointment for the B.J.P., there is some evidence that its strategy helped. The ruling party clinched eight seats in total, up from three in 2015, while the A.A.P. won 62 seats, down from the 67 it held.
Also, more voters turned out for the B.J.P. this election, increasing the party’s vote share to about 39 percent, up seven percentage points from 2015 polls.
“Their negative, violent and divisive strategy just got a shot in the arm,” said Rupa Subramanya, a prominent economist who once supported Mr. Modi, but has soured as his leadership turned divisive.
“Their strategy resonates enough to give their opponent a run for their money,” Ms. Subramanya added. “Expect more of this moving ahead.”
Mr. Modi’s emphasis on Hindu-nationalist themes have yielded two national election victories in a row, including winning states last year that had eluded his party before.
But as India struggles economically, with unemployment at a 45-year high, some economists worry that an increase in the party’s chest-thumping nationalism in statewide elections like the Delhi one will increase the risk of sectarian violence and add to the uncertainty investors despise.
Just days before releasing a much-anticipated budget, India’s deputy finance minister, Anurag Thakur, was exhorting crowds at an election rally in New Delhi to “shoot the traitors,” referring to protesters.
Some heeded the call. Last week, two men on a scooter shot at protesters at the Jamia Millia Islamia University, a center of the demonstrations. It was the second case in which gunmen fired at protesters since Mr. Thakur raised the violent chant two weeks ago.
But even for some supporters of the incumbents in Delhi, Mr. Modi’s party’s campaign struck a chord.
Dinesh Chauhan, a 27-year-old taxi driver, was waiting in a long line at a voting booth near his home in Tughlaqabad, in Delhi. While he liked Mr. Kejriwal and said he had done a good job of improving schools and electricity, he was planning to vote for the B.J.P.
Mr. Kejriwal “supports Muslims and the Shaheen Bagh protesters,” he said, referring to protests held in a Delhi neighborhood that blocked a major highway leading into the capital. They have become an emblem for the antigovernment protests the B.J.P. has railed against.
“That is why I am voting against him,” Mr. Chauhan said.
Still, for some voters, like Naseema Parveen, 62, development was the critical issue.
“We need leaders who can deliver jobs and development,” Ms. Parveen said, “not hate and dividing people on the basis of religion.”