Voting in India’s national election has ended, with exit polls predicting prime minister Narendra Modi’s Hindu nationalist party and its allies will win the right to govern for another five years.

Vote counting following the seventh and final phase of a gruelling poll that lasted more than five weeks will begin on Thursday, with the election result expected to be known the same day.

Exit polls by two leading television news channels, Republic and TimesNow, project a victory for Mr Modi’s Bharatiya Janata Party (BJP) and its allies, with 287 to 305 seats out of 543 — way ahead of the 272 seats needed to form the next government.

People stand in queues to cast their votes
People stand in queues to cast their votes (Rajesh Kumar Singh/AP)

The election was seen as a referendum on Mr Modi and the BJP.

The BJP’s main opposition is the Congress party, led by Rahul Gandhi, the scion of the Nehru-Gandhi dynasty that has produced three prime ministers.

The Congress party and its allies were likely to win 124 to 128 seats, the TV channels said.

Indian television channels have had a mixed record in the past in predicting election results.

A polling station
A polling station (Ashwini Bhatia/AP)

Mr Gandhi questioned the way the election was conducted by the autonomous Election Commission (EC), saying the election schedule was manipulated to help Mr Modi’s party.

“The EC used to be feared and respected. Not anymore,” Mr Gandhi tweeted on Sunday, without giving any details.

The final election round included 59 constituencies in eight states.

Up for grabs were 13 seats in Punjab and an equal number in Uttar Pradesh, eight each in Bihar and Madhya Pradesh, nine in West Bengal, four in Himachal Pradesh and three in Jharkhand and Chandigarh.

The election, which began on April 11, was largely peaceful, with voter turnout in the first six rounds at approximately 66%, the Election Commission said, up from 58% in the last national election in 2014.