Dinesh Gundu Rao quit as Karnataka Congress chief and Siddaramaiah quit as leader of the Congress legislature party after the party ended up with only two seats of its 12 seats it had won last year. "I need to respect democracy," Mr Siddaramaiah said after handing in his resignation to Congress president Sonia Gandhi.

"We have to agree with the mandate of the voters of these 15 constituencies. People have accepted the defectors. We have accepted defeat. I don't think we have to be disheartened," Karnataka Congress leader DK Shivakumar said.

Twelve of the 15 seats where bypolls were held were previously held by the Congress and the remaining three by the JDS.

The BJP fielded 13 of the MLAs who quit, with the Chief Minister describing them as "future ministers". The gamble paid off with 11 of the defectors winning today. The Congress was left with two and JDS scored zero.

Chief Minister BS Yediyurappa's next challenge is to keep his pre-poll promise he will need to accommodate the defectors, given the resentment within the BJP.

"We had given assurance to all the disqualified (Congress-JDS) MLAs that they will be made ministers. So there is no question of backtracking from what we promised them. We will make them ministers and give them responsibility to grow our party base in their area," said Mr Yediyurappa.

The BJP's sweetest victory was at Krishnarajapete, a JDS stronghold where it has never won before. The JDS rebel won, delivering the seat to the BJP for the first time. Mr Yediyurappa's son BY Vijayendra had run the party's campaign there.

Prime Minister Narendra Modi said the Karnataka bypoll results were a message for "all states" that people will punish those who went against the popular mandate. "The Congress stole the mandate through the backdoor. People of Karnataka have taught it a lesson," Prime Minister Narendra Modi said at a rally in Jharkhand today. He added that today's polls showed "the people trust only BJP can give a government that can deliver."

The election saw former allies Congress and JDS contest separately. Relations between the two, never smooth, broke down after their coalition crashed. The Congress had earlier declared its readiness to tie up with the JDS again if at all they had a shot at power.