India’s prime minister and his allies are on track to decisively win a second term, according to exit polls released after voting officially ended on Sunday night in the country’s marathon six-week elections.

Sampling by six pollsters showed Modi’s Bharatiya Janata party (BJP) and its coalition winning between 287 and 336 seats. The final tally each survey predicted varied but were uniformly well above the 272 seats needed to form government in India’s lower house. Two surveys showed the ruling coalition falling short – by between five and 30 seats.

Exit polls in India have a poor history predicting precise seat tallies but are more reliable in indicating a trend. All but one in 2014 showed the BJP’s coalition was on track to win a majority. In the end the party won 282 seats alone, the largest margin of victory achieved by a single party in three decades.

Congress, the BJP’s major national opponent, would win between 124 and 142 seats, said the surveys, which cannot be released under Indian law until 30 minutes after polling closes on the final day of voting.

The results were intensely analysed by commentators on the country’s news channels. The consensus from earlier polls was that Modi’s party would win but come down from its high watermark in 2014.

Some speculated that Modi’s party may have been benefiting from an unwillingness by voters to voice their preference for a party other than the BJP, especially if they belonged to minority groups or lived in areas where the campaigning had been especially charged.

In 2004, the last time the BJP lost government, exit polls also showed it would win handily. Instead it managed to take in just 189 seats: nearly 100 fewer than one exit poll had shown.

The results were dismissed by Mamata Banerjee, a rival of Modi’s and the chief minister of the crucial state of West Bengal. “I don’t trust exit poll gossip,” she tweeted. “I appeal to all opposition parties to be united, strong and bold. We will fight this battle together.”

The BJP would maintain its strong grip on Uttar Pradesh, the most valuable state with 80 seats on offer, an average of seven polls showed. It would win 49 seats, versus 29 for the gathbandhan (grand alliance), a coalition of traditionally opposing parties that formed to try to wrest back control. The BJP won 73 seats in the state in 2014.

In West Bengal, where campaigning was suspended early on Thursday because of street fighting between BJP supporters and those of their main opponents, the Trinamool Congress, Modi’s party could pick up 11 seats, according to two surveys, while another showed it winning 22. It won just two seats there five years ago.

The BJP has been trying to make inroads in the eastern state to counteract expected losses in Uttar Pradesh and other parts of north India’s “Hindi heartland” that the party swept in 2014.

Modi’s Hindu nationalist party is seeking re-election for another five years. The areas voting on Sunday included the prime minister’s constituency of Varanasi, a holy Hindu city where he was elected in 2014 with an impressive margin of more than 200,000 votes.

He spent Saturday night at Kedarnath, a temple of the Hindu god Shiva nestled in the Himalayas in northern India.

The last round of the election includes 59 constituencies in eight states. Up for grabs are 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. Counting of votes is scheduled for 23 May.

In Kolkata, the capital of West Bengal, voters lined up outside polling stations in the early morning to avoid scorching heat, with temperatures reaching up to 38C (100.4F). Armed security officials stood guard in and outside the centres because of fears of violence.

While the election since 11 April has been largely peaceful, West Bengal in eastern India is an exception. Modi is challenged here by the state’s chief minister, Banerjee, who leads the more inclusive Trinamool Congress party and is hoping for a chance to go to New Delhi as the opposition’s candidate for prime minister.

Mamata Banerjee, leader of the Trinamool Congress party. Photograph: Bikas Das/AP

Modi visited West Bengal 17 times in an effort to make inroads with his Hindu nationalist agenda, which provoked sporadic violence and prompted the election commission to bring campaigning to an early end.

Prodeep Chakrabarty, a retired school teacher in Kolkata, said Modi’s Bharatiya Janata party (BJP) was desperate to win some seats against Banerjee’s influential regional party.

“People are divided for many reasons. We have to wait for a final outcome to see who people are voting for. Things are not predictable like before,” he said.

Minorities in India, especially Muslims, who comprise about 14% of India’s 1.3 billion people, criticise Modi’s agenda. His party has backed a bill that would make it easier to deport millions of Bangladeshis who have migrated to India from the Muslim-majority country since its independence in 1971. The bill, however, eases the path to citizenship for Hindus, Sikhs, Parsees and Jains – non-Muslims – who have come from Afghanistan, Bangladesh and Pakistan over decades.

Voters were also up early in Varanasi in Uttar Pradesh state, where election workers arranged for drinking water, shade and fans to cool them down.

“I straight away came from my morning walk to cast my vote and was surprised to see enthusiasm among the voters,” said Ramesh Kumar Singh, who was among the first ones to vote. “There were long queues of people waiting patiently to cast their votes, which is a good sign for democracy.”

The election is seen as a referendum on Modi’s five-year rule. He also played up the threat of Pakistan, India’s Muslim-majority neighbour and arch-rival, especially after the suicide bombing of a paramilitary convoy on 14 February that killed 40 Indian soldiers.

The BJP’s main opposition is the Congress party, led by Rahul Gandhi, the scion of the Nehru-Gandhi dynasty, which has produced three prime ministers. Congress and other opposition parties have challenged Modi over a high unemployment rate of 6.1% and the suffering of farmers affected by low crop prices.

Some of Modi’s boldest policy steps, such as the demonetisation of high currency notes to curb black-market money and bring a large number of people into the tax net, proved to be economically damaging. A haphazard implementation of “one nation, one tax” – a goods and services tax – also hit small and medium-sized businesses.

Voter turnout in the first six rounds was approximately 66%, the election commission said, up from 58% in the last national vote in 2014.