NEW DELHI (Reuters) - India’s Supreme Court on Friday ordered the ruling Bharatiya Janata Party to prove it had the support of a majority of lawmakers in the southern state of Karnataka after an inconclusive election.

Karnataka, home to the technology hub of Bengaluru, has been at the center of a political storm, with the main opposition Congress saying Prime Minister Narendra Modi’s BJP formed a government there without having a majority.

“The honorable judges have risen to the occasion and saved democracy,” said Ghulam Nabi Azad, a leader of the Congress party, after three Supreme Court judges ordered Saturday’s trial of strength in the state legislature.

“They have shown the rule of law still exists in this country.”

The BJP fell short of an outright majority in the 225-member state assembly, despite emerging from last Saturday’s election as the single largest party, with 104 seats.

Congress, which had previously ruled the state, partnered with a regional party in an alliance after the poll to stake a claim to form the government, saying that together they had at least 117 seats.

But the state’s governor, who has the constitutional task of inviting the party with the largest number of seats to form the government after an election, picked the BJP for the role, prompting its rivals to turn to the courts.

The governor had given the BJP 15 days to prove its majority, according to a copy of a letter the party posted on social network Twitter.

Karnataka, with a population of 66 million, was the first major state this year to elect an assembly, and will be followed by three more before general elections in the summer of 2019.

The BJP has been gradually tightening its hold on India’s states, and now governs 21 of a total of 29, with Karnataka seen as offering a beachhead in the south, where the party’s presence is limited.

Critics have accused the BJP of trying to intimidate opposition legislators in Karnataka into breaking ranks, to amass a majority.

The BJP says it has the right to lead the state government because it emerged as the single largest party and is confident of winning the trust vote.

“We are absolutely sure of our numbers and will decisively prove our majority on the floor of the house,” it said on Twitter, following Friday’s decision.

The Supreme Court ordered state authorities to ensure adequate security for Saturday’s vote.