Indian Prime Minister Narendra Modi's party on Saturday walked away from a court-mandated test to prove it had the support of a majority of lawmakers to govern the southern state of Karnataka, after an election a week ago threw up no clear winner.
The move could now allow an alliance of the main opposition Congress and a regional party to form the government in the state.
Newly elected lawmakers had been due to vote in the assembly on the orders of the Supreme Court, which intervened after the opposition had protested against a decision of the Karnataka governor to invite Modi's Bharatiya Janata Party (BJP) to form a government in the state.
The BJP had emerged as the single largest party with 104 seats but fell short of a majority in the 225-member state assembly.
On Saturday afternoon, Karnataka BJP leader B.S. Yeddyurappa, who was sworn in as the chief minister on Thursday, said he would resign instead of trying to prove that he had the support of a majority of the legislators. His emotional speech was carried live by almost all Indian TV news channels.
His resignation would pave the way for an alliance of Congress, which ruled the state for the past five years, and a regional party to form the government. The block says it has 117 members, enough for an outright majority.
"Democracy has finally won the battle against the unholy politics of intimidation, corruption and lies," Congress said in a Tweet. "Congratulations Karnataka!"