A key ally of India's ruling BJP-led coalition has been trounced in state elections, in a major setback for Prime Minister Atal Behari Vajpayee.
Naidu was the BJP's biggest ally
Andhra Pradesh Chief Minister Chandrababu Naidu resigned after the defeat, which he accepted "with humility" after nine years in power.
Congress and allies swept to victory in the state, taking 226 of 294 seats.
The win comes two days before results in the general election, with exit polls indicating a hung parliament.
Mr Naidu's regional Telugu Desam Party was the biggest ally of the governing Bharatiya Janata Party in the last parliament, with 29 seats.
He was widely seen as one of India's most dynamic and progressive leaders, who helped turn the Andhra Pradesh capital, Hyderabad, into a leading information technology hub.
Recent exit polls had predicted his defeat but the scale of the Congress landslide has shocked many observers.
The value of the rupee and shares on the Indian stock exchange, already falling at the prospect of a hung parliament, suffered even bigger slides as news of Mr Naidu's defeat filtered through.
The BBC's Crispin Thorold in Delhi says that Mr Naidu was one of India's most computer savvy politicians, attracting high-profile visitors to the state such as Bill Clinton.
Congress celebrations began as Mr Naidu resigned
But critics say that Mr Naidu ignored the large rural population with his policies, failing to reach poorer voters.
Years of drought and increasing debt have driven hundreds of farmers in the state to commit suicide.
Addressing a crowded press conference at his residence, Mr Naidu said: "The people's verdict in these polls I accept with humility... we will analyse the result and why people responded in this way."
As Mr Naidu resigned, supporters of the Congress party began dancing in the streets of the state capital, Hyderabad, distributing free sweets and setting off firecrackers.
Senior Congress party leader YS Rajashekhar Reddy has now emerged as the front-runner for the chief minister's post.
The BBC's Omer Farooq in Hyderabad says the 55-year-old Mr Reddy has a tough, go-getting image.
Leading political analyst Mahesh Rangarajan told BBC News Online that while Mr Naidu enjoyed popularity in the media, his record on the home front led to his demise.
"The state's software exports are lower than neighbouring Tamil Nadu," he said, "while the rate of farmer's suicides due to debt was and is the highest in the country.
"Mr Naidu also raised the price of grain for the poor in a state which has the largest number of landless labourers."
The result in Andhra Pradesh is seen by many as a precursor to the national poll results, where the ruling BJP-led alliance is projected to struggle to reach an outright majority.
Votes were held in several states to coincide with the general election over the last three weeks, but Andhra Pradesh counted ballots earlier as its new assembly must be formed by Thursday.
Nationally, both the ruling alliance and the opposition Congress-led alliance were holding meetings on Tuesday to devise strategy ahead of Thursday's vote count.
Mr Vajpayee went into the elections hoping to cash in on talks with long-time rival Pakistan and a booming economy.
But with exit polls pointing to a hung parliament, whoever forms the government will have to rely on smaller parties - which could mean an administration less stable than the existing one.
Nevertheless, many observers believe it is unlikely that major policies, including talks with Pakistan, will be affected even by a change of government.