It was the result they said could not happen. India, the world's largest democracy, rode the crest of a surging economic wave. Peace had been brokered with Pakistan. And the national cricket team ruled the world. Surely Atal Bihari Vajpayee, its diminutive, poetry-writing Prime Minister, was guaranteed electoral victory.
But yesterday morning India awoke to discover that the world's most enduring political dynasty had risen from a decade-long slumber to create a political sensation. Against all predictions, an Italian widow who married into the Gandhi-Nehru clan is now on the brink of becoming the fourth member of the family to be Prime Minister of the world's largest democracy.
After nearly 14 hours of vote-counting for 539 of Parliament's 543 elected seats, official results showed Sonia Gandhi's Congress and its allies were leading the Hindu-nationalist-led National Democratic Alliance 210 to 181 seats. Communist and other leftist parties have said they would back Congress, and they had gained 59 seats.
The result sent shock waves around the region. While Pakistan and India came to the brink of nuclear conflict under Vajpayee, more recently the rivals had successfully embarked upon a peace process. Last night Pakistani leaders insisted that it would continue. Mrs Gandhi said: "The Congress party will take the lead to ensure our country has a strong, stable and secular government at the earliest."
Hers is by any standard a remarkable rise to power. The daughter of a builder from Turin, she met her future husband when she was a language student in Cambridge, England.
She married into the dynasty 36 years ago and was propelled into the forefront of Indian politics when her husband Rajiv was picked as the successor to the Gandhi-Nehru crown after the death of his brother in a plane crash in 1980.
After distancing herself from politics following her husband's assassination in 1991, Mrs Gandhi was initially seen as a reluctant politician. She officially took charge of Congress in 1998, but before yesterday's surprise result, her future in politics had looked uncertain
During the campaign Gandhi has been criticised by rivals because she was born in Italy and speaks Hindi with an accent. But then her children were deployed. It was a masterstroke.
At just 33, Rahul Gandhi is the rising star of Congress and easily won his own seat in the family's Uttar Pradesh state. He paid tribute to his mother. "I have seen my mother fight with her back to the wall. And she has won. She has won against all odds," he said, smiling broadly and garlanded with marigolds. Priyanka, his younger sister, did not stand for election but is widely regarded as a key Congress player.
In stark contrast, the long political career of Atal Bihari Vajpayee appears over. The 79-year-old bachelor, who has arthritic knees and kidney disease, was first elected to the Lok Sabha, the lawmaking lower house of Parliament, in 1957. He stepped down yesterday.
"India's Shining" ran the BJP's self-satisfied slogan. Mr Vajpayee's allies were convinced they had made India better off. And in metropolitan areas, that is a difficult argument to counter. Gleaming call centres rise from dusty building sites, alongside shimmering five-star hotels.
But there is another India. It is an India of the villages. An India of peasants and the perpetually poor. "What 'India Shining' are we talking about? We are dying hungry here," said Santram, a farmer just 45 miles from the new malls of the capital. They know nothing of the economic boom, the internet and mobile phones. They do, however, know about democracy.
And so the often-forgotten poor were able to wield political muscle in a style unimaginable almost anywhere else in the third world. The Congress Party argued that the country's rural poor had been left behind by the government's push for economic growth. It also presented itself as a secular alternative.
It was that doctrine that led India to independence and yesterday it was embraced again. Ecstatic, if surprised, Congress supporters beat drums and danced in the New Delhi streets.
Up on the balcony of India Coffee House high above Connaght Place in the heart of the city, retired lawyers and doctors were poring over the results in the pages of the Indian newspapers. Just two months ago, here and in countless similar establishments, the Gandhi-Nehru dynasty's political obituary was being written. Now it is back.
Additional reporting from Jeremy Copeland in New Delhi.Reuse content