How India's elections were won and lost
by Soutik Biswas - BBC News Online correspondent in Delhi
The debacle suffered by India's ruling Bharatiya Janata Party (BJP)-led 22-party alliance proves the country's voters cannot be taken for granted.
Hindu nationalist premier Atal Behari Vajpayee, touted as the ruling coalition's show-stopping, vote-catching statesman-politician, had called the polls six months early on the back of his peace initiatives with nuclear rival and neighbour Pakistan and a perceived heady feeling over robust economic growth.
His party spin doctors had coined the phrase "India Shining" - a reference to what they said was a feel-good factor sweeping the country.
The government spent taxpayers' money spreading the good word.
It seemed to be a cruel joke in a nation where a third of the people still live on less than $1 a day and human development indices are largely appalling.
As it turns out, most of the voters were not amused and decided to put the lights out on the BJP and its allies, leaving politicians and analysts stunned by the extent of the defeat.
Not that the BJP-led coalition was on a roll in the run-up to the elections, despite glowing reports in the Indian media about its seeming invincibility.
Some of its major regional allies such as the Telugu Desam Party (TDP) and AIADMK party were in trouble in their respective states of Andhra Pradesh and Tamil Nadu.
The BJP itself was lagging behind in the politically crucial states of Uttar Pradesh and Bihar.
The television exit polls after the initial rounds had given the first signs of warning: Most of them showed the main opposition Congress and its allies narrowing the gap with the BJP-led National Democratic Alliance (NDA) coalition.
"But the margin of NDA's defeat is truly stunning. The odds that the Congress could so soon become the largest party of India were certainly very low. It is a most surprising result," says Professor Ashutosh Varshney, who teaches political science at the University of Michigan.
He says: "The conclusion is inescapable. The less economically privileged sections of India and the minorities have spoken loudly, clearly and unambiguously, and the privileged have in all probability not even stepped out to vote."
Analysts believe that, on the whole, India's less privileged - the rural masses and the urban poor - appeared to have found the BJP's "India Shining" campaign unacceptable and offensive.
"There is no doubt that the Indian economy has done very well of late, but the primary beneficiaries have been the rich and the urban middle class. The less privileged outnumber the middle classes by a big margin," says Professor Varshney.
He reckons the middle and richer urban classes, the beneficiaries of economic reforms and the greatest supporters of the BJP, "stayed home", whereas the less privileged and the minorities "stepped out in large numbers to vote".
Political commentator Harish Khare agrees, saying the extent of the BJP-led coalition's defeat showed the government had followed "anti-people economics" with its programme of reforms.
"The question is not whether economic reforms will continue. The question is about ways and means of making reforms meaningful for the poor and the dispossessed," he says.
Pratap Bhanu Mehta, who teaches government at Harvard University, says it is difficult to pin down any one reason which formed the basis of the judgement of Indian voters.
He says: "What is the litmus test on the basis of which government performance is judged? Growth? Low inflation? Unemployment? Corruption?
"None of these criteria will singly measure up. Nor will outdated explanations like caste and vote bank politics illuminate the outcome.
"The only thing there is a consensus on is the fact that the electorate will not let anyone take it for granted. The effects of economic growth are too diffusely spread for governments to be rewarded."
The split verdict in the BJP stronghold of Gujarat, which was rocked by one of the worst bouts of communal rioting since Independence, is also significant.
"The BJP's setback in Gujarat is one of the redeeming features of this election. It is a clear rejection of communal politics. The average, pragmatic middle class Gujarati does not want a perpetual civil war in the state," says Mr Khare.
The revival of fortunes of India's grand old Congress party, has now become the talking point in the country.
The 119-year-old party was hobbled by internal feuds and looked listless and lacklustre in the run up to the elections.
The induction of Rahul Gandhi, the scion of the Nehru-Gandhi dynasty, in the election fray was seen by rivals and commentators as a desperate ploy by a sinking party.
"This is a significant victory for the Congress, in light of the fact that its ideology, leadership and organisation had all been written off," says Mr Mehta.
The big question now is whether the Congress and its Communist allies, who have mixed views on economic reforms, will be able to forge a workable ruling coalition led by Sonia Gandhi, a completely untested leader in government or coalition politics.
Mr Mehta says "ideologically there is no reason why a Congress-led coalition should not be a cohesive one".
"The question will turn more on the skills, imagination and management techniques the party employs for pushing things through," he adds.
Prof Varshney says a Congress-left coalition would depend on whether a "common minimum programme" between the two parties can be successfully evolved.
"If that's done the odds are that a reasonably stable government can be formed," he says.
The days ahead will prove how the Congress and the leftist parties thrash out their differences over the path of economic reforms - and whether the leftist parties will join the new government.
The thinking is that the reforms will go on, but the new economic policy will be more inclined towards agriculture with an emphasis on the development of villages.