NEW DELHI -- India's opposition party swept to victory in the country's national election Friday, setting the stage for Hindu nationalist and economic overhaul advocate Narendra Modi to become India's next prime minister.
Mr. Modi, 63, chief minister of the western state of Gujarat, ran an efficient monthslong campaign, spreading his message of hope and revitalization at thousands of rallies across the country. Ultimately voters overwhelmingly chose his message of change, with the opposition Bharatiya Janata Party and its allies garnering well over the 272 seats needed for a clear majority in Parliament.
The "Modi wave," as it was called, meant crushing defeat for the governing Congress Party and its 43-year-old scion, Rahul Gandhi, its chief campaigner. Across the country, voters heading to the polls said they were unhappy with corruption scandals and ineffectual leadership after 10 years of Congress party rule under Prime Minister Manmohan Singh.
U.S. officials sent congratulations as they tried to smooth over past differences with India and with Mr. Modi.
An ebullient Mr. Modi spoke at two victory rallies in his home state of Gujarat on Friday, with crowds interrupting his remarks with chants of "Modi, Modi, Modi!" He reveled in the mandate his party had achieved but pledged an inclusive government for a "shining India" that will make the 21st century "India's century."
"India's social differences will come together and make a flag, just like different threads come together to weave a cloth," Mr. Modi said. "People rose above caste rhetoric, a new foundation has been laid and will build a new shining India in the coming days."
Mr. Modi, the son of a tea seller from one of India's lower castes, grew visibly emotional when he spoke of the people of his home state, where he grew from a boy in a small village to the four-term chief minister.
"You people of Gujarat are my mother and father. You have raised me. While I serve Mother India, I will also worry about you," he said. "You are my energy, you are my inspiration, you are my strength."
Meanwhile in the capital, New Delhi, Mr. Modi's supporters celebrated in the streets, setting off fireworks, dancing and singing. But the Congress party headquarters was almost deserted, with security officials and media outnumbering workers. The mood was somber.
Mr. Gandhi, alongside his mother, Sonia, the party's president, made brief remarks, accepting responsibility for the defeat of the party, which has dominated Indian politics for most of its 128 years.
The telegenic Mr. Gandhi comes from a historic lineage of former prime ministers but had failed to connect with voters on the campaign trail and performed poorly in major television interviews. Mr. Gandhi did retain his parliamentary seat representing Amethi, in the northern Indian state of Uttar Pradesh, that has been a Gandhi family bastion for years.
The United States congratulated Mr. Modi without hesitation Friday, appearing to look beyond a past controversy: As Gujarat's chief minister, Mr. Modi failed to control riots when the state descended into religious violence more than a decade ago. That led the United States to deny Mr. Modi a visa in 2005.
But President Barack Obama called Mr. Modi on Friday, the White House said, and invited him to visit Washington at some point in the future.
The Obama administration is eager to get off on the right foot with Mr. Modi and to put a deep rift with the Singh government to rest. Although relations have been patched over in the past few months, the scars are still fresh from a diplomatic row over the December arrest of an Indian diplomat in New York.
The Singh government was outraged over what it called egregious mistreatment of the diplomat, and it retaliated by removing some security measures at U.S. diplomatic facilities in India and eliminating perks for diplomats there.
The U.S. ambassador to India met with Mr. Modi in February after years in which the populist politician was largely shunned by Washington. The meeting was a signal that the United States would work with Mr. Modi if he won.
News that business-friendly Modi and his party were headed for a rout sent the Sensex, the Indian stock market, soaring, and the rupee strengthened against the dollar.
India's business community hopes Mr. Modi will be able to fulfill his campaign promises to jump-start the economy, create jobs and restart stalled infrastructure projects, but he faces steep challenges. In recent years, the country's growth rate and job creation have dipped, inflation has skyrocketed, and investors stymied by the country's sluggish bureaucracy have either sat on their money or taken it elsewhere.
Friday's vote count was the culmination of six weeks of voting in a country of 1.2 billion people, the world's largest democratic exercise. A record 66 percent of the country's 814 million voters went to the polls.
An early analysis of exit poll results this week by Milan Vaishnav of the Carnegie Endowment for International Peace in Washington suggested that Mr. Modi's party had not only dominated the urban vote, but also India's rural areas, which had long been a bastion of the Congress Party. In addition, Mr. Modi also won the hearts of the country's younger voters, a huge factor in a county where two-thirds of the population is under the age of 35.
"It is an important election because the trend in the counting shows that old ideas about caste, religion and region have not been relevant. By and large, it has been a vote for change, for development and for a decisive leader," said Dipankar Gupta, a political analyst and author. "The youth across India have voted for change, and Modi represented that change."
Mr. Gupta noted that results showed little difference between India's Internet-connected and increasingly sophisticated urban voters and the nearly 70 percent of the country that still lives in rural areas.
But among India's Muslims, there were some foreboding about what the victory of Mr. Modi's party portends for them.
Discrimination against Muslims in India is so rampant that many barely muster outrage when telling of the withdrawn apartment offers, job rejections and turned-down loans that are part of living in India for them. As a group, Muslims have fallen badly behind Hindus in recent decades in education, employment and economic status, with persistent discrimination by a Hindu majority a key reason why. Muslims are more likely to live in villages without schools or medical facilities and less likely to qualify for bank loans.
Now, in the wake of a landslide electoral triumph Friday by India's Bharatiya Janata Party, a Hindu nationalist party, some Muslims here said they were worried that their place in India could become even more tenuous.
Mr. Modi has a fraught relationship with Muslims, who make up about 15 percent of the country. He was in charge of the western state of Gujarat in 2002 when uncontrolled rioting caused 1,000 deaths, mostly among Muslims. He has also been linked with a police assassination squad that largely targeted Muslims.
But Mr. Modi ran a campaign that focused on promises of development and good governance and largely avoided religiously divisive themes. His allies say there is no reason for Muslims to fear a national government led by him, and in interviews Friday many Muslims said they believed that.
The New York Times contributed.