India Karnataka: Modi ally resigns in regional crisis
India's ruling Bharatiya Janata Party (BJP) has suffered a setback after the chief minister of the southern state of Karnataka resigned minutes before a vote of confidence in the assembly.
BS Yeddyurappa said he could not get the numbers to secure a majority.
A coalition government will take over and replace the chief minister, who has held office for less than three days.
The Supreme Court ordered the vote when the opposition Congress complained the BJP lacked the necessary support.
The BJP won 104 of the 222 seats in recently concluded state polls, but fell short of a majority by eight seats.
The Congress emerged as the second largest party and declared an alliance with a regional party, Janata Dal (S), which won enough seats to give their coalition a majority in the new assembly.
- The Indian lawmakers being guarded in 'secret locations'
- Why India's Narendra Modi remains star BJP vote-catcher
But the governor, Vajubhai Vala, invited the BJP to form the government and even allowed their candidate, BS Yeddyurappa, to be sworn in as chief minister.
His controversial decision had led to a major standoff, with many calling it a violation of the constitution.
Opposition parties challenged his decision in the Supreme Court, which ruled that the BJP had until 1600 (1030 GMT) on Saturday to win over eight members from the opposition alliance to form the government.
Analysts believe losing Karnataka would have been a major blow for Congress which rules only three of India's 29 states. The BJP and its allies are in power in 21.