PRIME Minister Narendra Modi has claimed victory for his alliance on Tuesday in India’s general election, despite a lacklustre performance from his own party.

He faced a stronger than expected challenge from the opposition, which rejected the leader’s mixed economic record and polarising politics.

Modi said that his National Democratic Alliance will form the government for the third consecutive time. “Today’s victory is the victory of the world’s largest democracy” he said, speaking at his party headquarters.

For the first time since Modi’s Bharatiya Janata Party swept to power in 2014, it appeared unlikely that it would secure a majority on its own.

But the prime minister’s coalition was still expected to be elected to a third five-year term in the world’s largest democratic exercise.

If Modi, 73, does have to rely on coalition support to govern, it would be a stunning blow for him. He had hoped for a landslide victory.

READ MORE: Rachel Reeves denies Anas Sarwar 'blew apart' her fiscal rules in debate

Despite the setback, many of the Hindu nationalist policies he has instituted over the last 10 years remain locked in place.

In the face of surprising numbers, the opposition claimed they had also won a victory of sorts, with the main opposition Congress party saying the election had been a “moral and political loss” for Modi.

“This is public’s victory and a win for democracy,” Congress party president Mallikarjun Kharge told reporters.

In his 10 years in power, Modi has transformed India’s political landscape, bringing Hindu nationalism, once a fringe ideology in India, into the mainstream while leaving the country deeply divided.

His supporters see him as a self-made, strong leader who has improved India’s standing in the world.

His critics and opponents say his Hindu-first politics have bred intolerance and the economy, the world’s fifth-largest and one of the fastest-growing, has become more unequal.

READ MORE: John Swinney and Anas Sarwar clash in TV debate over Labour's economy plans

The counting of more than 640 million votes cast over six weeks was expected to last into the night.

Some 12 hours into counting, partial tallies reported by India’s election commission showed Modi’s BJP was ahead in 114 constituencies and had won 126 of 543 parliamentary seats. The Congress party led in 45 constituencies and had won 54.

A total of 272 seats are needed for a majority. In 2019, the BJP won 303 seats, while they secured 282 in 2014 when Modi first came to power.

The BJP-led National Democratic Alliance led in 147 constituencies and won 139, according to the partial count. The Congress party is part of the India alliance, which led in 131 constituencies and had won 99.

The election commission does not release data on the percentage of votes tallied.

Exit polling from the weekend had projected the NDA to win more than 350 seats.

READ MORE: Nigel Farage hit with milkshake as he launches election campaign

Indian markets, which had hit an all-time high on Monday, closed sharply down Tuesday, with benchmark stock indices, the Nifty 50 and the BSE Sensex, both down by more than 5%.

If Modi wins, it would only be the second time an Indian leader has retained power for a third term, after Jawaharlal Nehru, the country’s first prime minister.

But if his BJP is forced to form a coalition, the party would likely “be heavily dependent on the goodwill of its allies, which makes them critical players who we can expect will extract their pound of flesh, both in terms of policymaking as well as government formation”, said Milan Vaishnav, director of the South Asia Programme at the Carnegie Endowment for International Peace.

“This would be truly, you know, uncharted territory, both for Indians as well as for the prime minister,” he added.

Before Modi came to power, India had coalition governments for 30 years. His BJP has always had a majority on its own while still governing in a coalition.

Over 10 years in power, Modi’s popularity has outstripped that of his party’s, and turned a parliamentary election into one that increasingly resembled a presidential-style campaign.

The result is that the BJP relies more and more on Modi’s enduring brand to stay in power, with local politicians receding into the background even in state elections.

The country’s democracy, his critics say, is faltering under his government, which has increasingly wielded strong-arm tactics to subdue political opponents, squeeze independent media and quash dissent.

The government has rejected such accusations and say democracy is flourishing.

And economic discontent has simmered under Modi. While stock markets reach record-highs and millionaires multiply, youth unemployment has soared, with only a small portion of Indians benefiting from the boom.