Prime Minister Atal Bihari Vajpayee, the Hindu nationalist leader who presided over an economic boom in India, its emergence as a declared nuclear power and a widely applauded peace initiative with Pakistan, resigned after a secular opposition alliance led by the Congress party scored a stunning upset in parliamentary elections.

Although a new government has not been formed, Congress party officials said Vajpayee is likely to be succeeded as prime minister by party leader Sonia Gandhi, the Italian-born widow of former prime minister Rajiv Gandhi and the head of modern India's most famous political dynasty.

The counting of results Thursday from elections that were spread over the past three weeks brought a dramatic and unexpected reversal for Vajpayee, 79, and his Bharatiya Janata Party (BJP), which leads the coalition that has governed India since 1998.

Only a few weeks ago, pollsters had predicted that the ruling coalition would coast to victory on the strength of India's recent economic growth, Vajpayee's personal appeal and his popular moves toward peace with Pakistan.

But if the government's campaign theme of "India Shining" played well with the growing -- and predominantly urban -- middle class, it apparently failed to resonate in the impoverished rural villages where most of India's billion-plus people still live.

-- John Lancaster

Sonia Gandhi, leader of India's Congress party, waves to supporters in New Delhi. Gandhi is likely to become prime minister.