A leader from Indian Prime Minister Narendra Modi’s party was sworn in as chief minister of a key southern Indian state on Thursday, despite lacking a majority, after the Supreme Court rejected a last-minute bid to block the move. Modi’s Bharatiya Janata Party (BJP) was the biggest winner in the Karnataka state election but has fallen short of a majority, sparking a scramble for power between the party and its arch rival Congress. The Congress party, which lost sole control of the state in Saturday’s election, tried to stop the BJP’s B.S. Yeddyurappa from taking the oath as chief minister by stitching up a last-minute coalition with a smaller regional party. But the BJP argued that it should get the first chance to form a government as it is the largest party and state governor Vajubhai Rudabhai Vala gave it 15 days to prove it has a majority, prompting the Congress to go to court. Following a three-hour hearing that began around midnight, the Supreme Court rejected the Congress claim that it already had a majority by joining hands with the smaller Janata Dal (Secular) party. The BJP won 104 seats in the 224-member assembly, nine short of a majority. Congress fell to 78 seats from 122 in the previous election. It has offered to support Janata Dal that won 37 seats. Congress and Janata Dal also claim to have the support of two independents and have accused the BJP of trying to bribe their members to switch sides. Janata Dal leader H.D. Kumaraswamy said the BJP had offered US$15 million each to as many as 32 lawmakers. The BJP denies the claims. Congress is desperate to cling on to Karnataka, its last major bastion after being defeated in 12 state elections since it lost the national government to Modi in 2014. Its leader Rahul Gandhi, scion of India’s famed Nehru-Gandhi dynasty, has still not won a state election since he took over from his mother Sonia Gandhi last year. With national elections due next year, state polls are being closely watched by both parties.