NEW DELHI — Prime Minister Narendra Modi appeared poised to win reelection in the world’s largest democracy, according to exit polls released after voting ended Sunday in India’s marathon national election.

Official results are to be released Thursday. Exit polls in this nation of more than 1.3 billion people have a patchy record: Past surveys have both underestimated and overestimated the strength of the winning party.

But Sunday’s exit polls suggested that Modi’s Hindu nationalist Bharatiya Janata Party and its allies would win a majority of seats in the lower house of Parliament.

Modi, the most popular and polarizing politician in India, ran a campaign highlighting his tough stance on national security and making forthright appeals to patriotism. 

Over the past five years, the Modi government has instituted a handful of economic reforms, rolled out schemes to assist poor Indians and launched a nationwide cleanliness drive. But it failed to deliver on its core promise to create jobs: The unemployment rate surged last year to a 45-year high.

The exit polls seemed to indicate that Modi’s campaign strategy had paid dividends. Seven polls suggested that the BJP and its allies would garner between 287 and 340 seats in the lower house, well above the 272-seat threshold for a majority.

Two exit polls predicted that Modi’s coalition would fall short of that mark.

The polls showed the main opposition Congress party and its allies winning between 70 and 164 seats. Observers expected that opposition parties would try to cobble together a coalition of their own if Modi’s party stumbled.

Some members of the opposition parties emphasized the unreliability of exit polls and the potential for surprises when results are announced Thursday. 

Sunday was the seventh and final day for casting ballots in an election with nearly 900 million eligible voters that began April 11. The battle was bruising, as election authorities repeatedly stepped in to discipline candidates for violating rules on campaign rhetoric.

The overall voter turnout was 66 percent, the same as in the 2014 election. Five years ago, Modi appealed to the aspirations of voters, promising development for all and the advent of “achhe din,” or good times.

This year’s campaign was less about hope than fear: Modi projected himself as the only leader who could ensure the nation’s security. He pointed to the airstrikes he ordered in February on an alleged militant training camp inside Pakistan.

Senior BJP leaders, meanwhile, engaged in anti-Muslim rhetoric. Amit Shah, the party’s president, called Muslim migrants who enter the country illegally “termites.” Yogi Adityanath, the radical Hindu priest who leads country’s largest state, said opposition parties were infected with a “green virus” (the color traditionally associated with Islam).

The election was largely peaceful until its final days. In West Bengal, one of the most populous states in the country, the BJP was engaged in a bitter contest for votes with the local party that governs the state, the Trinamool Congress.

On Wednesday, clashes broke out between supporters of the two parties in Kolkata, the state capital. On Sunday, two crude bombs were thrown near a voting booth in the city, creating panic among voters. Each party accused the other of fomenting violence to keep people away from voting sites.

Amal Roy, 28, said he cast his vote keeping in mind the dire employment situation for young people like him. Although the Kolkata man has a university degree, he has been unable to find steady work and drives a minibus to support his sick father.

“There are no jobs anywhere,” he said. “The government should look into this.”

Sandhya Bag, 65, a widow who works as a domestic helper, voted out of a sense of resentment. The Trinamool Congress favors the minority Muslim community in the state, she said, to the detriment of Hindus like her. She voted for the BJP.

Niha Masih in Delhi and Kalpana Pradhan in Kolkata contributed to this report.