After 39 days of polling involving as many as 900 million voters, balloting in India’s vast parliamentary election came to a close on Sunday, starting a countdown to the announcement of final results on Thursday.

The first batch of exit polls predicted that Narendra Modi, the prime minister, would return to power. According to five different polls released by Indian media organizations Sunday night, Mr. Modi’s party, the Bharatiya Janata Party, or B.J.P., and its allies were forecast to win a majority of seats in the lower house of Parliament.

The Indian National Congress, the leading opposition party, seemed to have done marginally better than its stunning defeat in the last elections in 2014, but it remained a distant second to Mr. Modi’s alliance. Most of the exit polls predicted Mr. Modi’s party and its allies would win about 290 to 300 seats in the 545-seat lower house, which chooses the prime minister.

Though many Indians have complained about rising unemployment and despite accusations that the B.J.P.’s Hindu-first conservative creed is putting Muslims and other minorities at risk, Mr. Modi’s popularity remains vast, particularly among India’s Hindu majority. Many Indians credit him with programs that have helped the poor and cut through red tape and corruption.