The FTSE Bursa Malaysia KLCI Index jumped 6.8% to a lifetime high of 1,808.90 in early trade on Monday. The local currency, the ringgit, hit a 10-month high.

'Polarisation'

In the 2008 polls, the BN lost its two-thirds majority in parliament for the first time - something it failed to regain in these elections.

As the result was confirmed, Mr Najib, 59, urged all Malaysians to accept his coalition's victory but acknowledged there was work ahead.

"One of the programmes we will undertake is national reconciliation... I think we realise that there are a lot of things we have to do as a party," he said.

He noted that ethnic Chinese voters had turned to the opposition, which has pledged to reform the government's affirmative action policies that benefit ethnic Malays, in what he called "a Chinese tsunami".

Media captionAnwar said irregularities cost him seats

"The results show a trend of polarisation which worries the government. If it is not addressed, it can create tension or division in the country," Mr Najib said.

Unconfirmed reports suggested that the coalition did not receive a majority of the popular vote.

Tallies by independent online media gave the BN coalition 49% of the vote, which would make Mr Najib the first leader to win with a minority of the popular vote, AFP news agency reported.

Mr Anwar, meanwhile, accused the authorities of widespread abuses which he said had distorted the result of the election.

"It is an election that we consider fraudulent and the Electoral Commission has failed," he told a news conference after midnight on Monday.

Malaysia 2013 polls

Election was considered Malaysia's most keenly contested poll since independence

"We see these irregularities have cost us many seats, particularly those with narrow margins," he said.

Allegations of election fraud had surfaced before the election. Some of those who voted in advance told BBC News that indelible ink on their hands - supposed to last for days and show they had already voted - had easily washed off.

The opposition also accused the government of funding flights for supporters to key states, which the government denied.

Independent pollster Merdeka Center cited unconfirmed reports of foreign nationals being given ID documents and being allowed to vote.

There were also reports of attacks against independent media. Most traditional media in Malaysia are linked to the ruling parties.

This result is a bitter blow to the opposition coalition, after a spirited campaign that tapped into a hunger for change among many younger Malaysians, the BBC's Jonathan Head in Kuala Lumpur reports.

They had believed a surge of support, especially in urban areas, would be enough to unseat a ruling coalition that has been in government for more than half a century, our correspondent adds.

Thousands of opposition supporters swapped their Facebook profile photos for black boxes to show their dismay when they learned that the ruling coalition had retained power, AP news agency reported.