India's opposition Congress party suffered an electoral setback Tuesday in one of the last major states which it governs and scrambled to build a coalition to stop Prime Minister Narendra Modi's party taking over.

Modi's Bharatiya Janata Party (BJP) won most seats in Karnataka but fell short of a clear majority in the state of 60 million people, which includes the wealthy global IT hub of Bangalore.

The result is being closely watched before a national election next year.

The BJP won 104 seats, according to the latest Election Commission of India figures.

Modi's party needs 113 seats to secure a majority and complete the humiliation of Congress, which was tipped to win 78 seats -- a huge fall from 122 in the previous assembly.

Congress was planning to strike an alliance with the regional Janata Dal (Secular), which finished third with 37 seats.

‘That's the best way to keep the BJP out of power,’ incumbent Congress chief minister Siddaramaiah told reporters in Bangalore.

A Congress-Janata Dal alliance would have a majority in the 224-member assembly.

The BJP accused Congress of betraying voters to salvage its ‘pathetic defeat’ and claimed it could still form the government.

‘Congress, despite having been rejected by the people, is trying to gain a backdoor entry,’ B.S. Yeddyurappa, the BJP's candidate for state chief minister, told reporters.

‘BJP has emerged as the single largest party. We have requested the governor to give us an opportunity to prove our majority on the floor of the assembly,’ he said without revealing details.

Modi's party could try to tempt rebels in Congress and in Janata Dal to give it a majority.

A record 70 percent of the nearly 50 million voters turned out in Saturday's election.

Congress, which lost control of the national government to Modi in 2014, is desperate to cling on to Karnataka.

Without it the party would control only three states -- Punjab, Puducherry and Mizoram -- which together account for just 2.5 percent of India's 1.25 billion people.

The BJP rules 21 out of India's 29 states. Since its landslide national win in 2014 the Modi juggernaut has stormed northern India, claiming around a dozen crushing state victories.

Modi and Gandhi traded barbs at rallies before tens of thousands in the Karnataka campaign.

Gandhi, scion of India's Nehru-Gandhi dynasty, had hoped Karnataka would be his first election victory since taking over as Congress leader from his mother Sonia this year.

Political analyst Amulya Ganguli said the result should be a wake-up call for Congress.

‘The Congress is in complete shambles. There is no leader in the Congress who can capture the imagination of the people,’ Ganguli told AFP.

‘The problem is Congress still thinks of itself as the grand old party of independence. It still thinks it is the one and only party.

‘It has to align itself judiciously with other regional parties if it is to stop the BJP juggernaut,’ he said.

Related Story