The controversial Hindu nationalist leader Narendra Modi has won a historic landslide election victory in India, the world's largest democracy.

With most of the 550m-plus votes counted, Modi's Bharatiya Janata party (BJP) appeared to have far exceeded all predictions and had close to an outright majority of the 543 elected seats in India's lower house. With its allies' seats included, the BJP appeared set to hold more than 330.

The Congress party, which has been in power since 2004, appeared to be heading for its lowest ever tally, winning only 42 seats by mid-afternoon.

Results will be finalised within hours, but it is clear that India's political landscape has been transformed. The vote is the most decisive mandate for any Indian leader since the 1984 assassination of prime minister Indira Gandhi propelled her son Rajiv to office. The country has been governed by coalitions for 25 years.

"You have faith in me and I have faith in you," Modi told an ecstatic crowd in his constituency of Vadodara after the election victory had been conformed. "The people of this country have given their verdict. This verdict says we have to make the dreams of 1.25 billion people come true. I must work hard."

World leaders rushed to telephone Modi. Nawaz Sharif, the prime minister of neighbouring Pakistan, with which India has fought four wars, invited the new leader to visit.

Ravi Shankar Prasad, a senior BJP leader, told the Guardian that India would be "a power with dignity, with responsibility and of constitutional integrity" under his party's rule.

A victory on such a scale will prompt some concern internationally. Modi is a polarising figure whom critics accuse of sectarian prejudice and authoritarian tendencies. The scale of his mandate means he will not have to work with allies and will be able to set his own agenda.

Supporters, who thronged the BJP headquarters in Delhi to sing, set off firecrackers, bang drums and chant support for the 63-year-old leader, say he will bring honest government, efficient administration and much-needed economic reforms.

"I am elated. It's time for change," said Gautam Sood, a 28-year-old student.

At the Congress party headquarters, a different mood prevailed.

"It is very disappointing for us all, but we accept the verdict of the people. Congress has bounced back before and we are confident that we will bounce back again," said Rajeev Shukla, a former minister and senior party official.

Others blamed the defeat on a failure to communicate the party's achievements during 10 years in power.

"We gave the people growth and so many other things, but an environment was created where people felt nothing was being done," said spokeswoman Priyanka Chatturvedi. The party has been in power for all but 18 years of the past 67 years.

The outgoing government was hit by corruption allegations, a failure to rein in runaway inflation and faltering growth. India needs to create 10m jobs each year for new jobseekers alone.

Modi and other party officials have promised that a BJP government will take decisive action to unblock stalled investments in power, road and rail projects to revive faltering growth. Indian stockmarkets soared early in the day as results began to come clear.

Modi's "development for all" message appeared to have struck a chord with frustrated voters, particularly the young.

Since being named as his party's candidate last September, he has flown 300,000km and addressed 457 rallies in a slick, presidential-style campaign that has broken the mould of Indian politics.

A huge social media campaign has reached out to voters across the nation. He received more than seven times the media coverage of his rival Rahul Gandhi, one study showed.

As the scale of the victory became clear, Modi sent a message saying "India has won", which instantly set a record as the country's most retweeted Twitter post.

Senior BJP officials sought to allay concerns about sectarian prejudice. As the governor of the state of Gujarat, Modi was accused of allowing, or even encouraging, riots in 2002 in which about 1,000 people, mainly Muslims, died. The violence was sparked by an arson attack on a train carrying Hindu pilgrims which killed 59 people. A supreme court investigation found insufficient evidence to support the charges and Modi has always denied any wrongdoing.

"Let our work speak for us. Gujarat has the highest economic growth rate for Muslims in the country. The myths have been broken. Mr Modi will govern for all India and all Indians," said Prasad.

Relations between India's 150m Muslims and the Hindu majority became a key theme in the bitterly fought five-week campaign, as candidates traded accusations of seeking to win votes through targeting particular communities or raising sectarian tensions.

The key battleground state of Uttar Pradesh (UP) is particular prone to intercommunal violence, though the campaign remained largely peaceful. The BJP appeared set to win 70 or more of the 80 seats in the state, traditionally seen as the electoral gateway to power in Delhi.

Gandhi, the 43-year-old scion of south Asia's most famous political dynasty and vice-president of the Congess party, was leading in his own seat of Amethi, but by a hugely reduced margin. The seat is a family bastion that has been held in turn by his uncle, father and mother. A loss there would spell disaster for the great-grandson of India's revered independence leader, Jawarhalal Nehru.

The Cambridge-educated former management consultant has struggled to connect with voters and failed to develop any significant momentum throughout the campaign. Congress officials nonetheless rallied around the Gandhi family.

"This is not about one particular leader or individual," said Salman Soz, a party official. There was some scant consolation for the party. Sonia Gandhi, the president of the congress, retained her seat of Rae Bareli, but Meira Kumar, the parliamentary speaker, was one of dozens of senior party figures who lost their seats.

Modi watched the results on television alone at his home in Gujarat, and then met his mother, 95-year-old Hiraben, at his brother's modest government flat in the state capital, Gandhinagar.

He touched her feet and she put a red stripe on his forehead as a blessing, while firecrackers exploded outside amid chants of "Modi, Modi".

The former organiser for far-right organisations was expected to embark on a victory tour to his local constituency of Vadodara, while party workers in New Delhi hoped he would visit for what is likely to be a hero's welcome.

The newly formed Aam Admi, or common man party, which had promised to revolutionise Indian politics and purge corruption from public life, did not make the breakthrough some had hoped for, winning seven seats.

Officials said they were pleased.

There were also mixed results for India's female regional leaders.

In Tamil Nadu, chief minister Jayalalithaa Jayaram's party, the All India Anna Dravida Munnetra Kazhagam (AIADMK), was reported to be leading in 37 of 39 seats. Mamata Banerjee, chief minister of West Bengal did well but Mayawati Kumar, a key powerbroker in Uttar Pradesh was wiped out.