Media playback is unsupported on your device Media caption Anwar Ibrahim: "I am disgusted at the fact that... they could steal an election"

Opposition leader Anwar Ibrahim has urged supporters to stage a protest after Malaysia's ruling coalition won polls he said were marred by fraud.

His call came as PM Najib Razak was sworn into office after his Barisan Nasional (BN, National Front) coalition won 133 of the 222 parliamentary seats.

Mr Anwar's three-party alliance secured 89 seats on Sunday in the country's closest polls since independence.

The BN has been in power in Malaysia for more than half a century.

The polls saw an 80% voter turnout, amid strong campaigning from both sides.

Analysis I met people who showed me how they had been able to wash the supposedly indelible ink off their fingers within minutes of voting. The deputy chairman of the Election Commission told me this was not important. People needed to show their identity card to vote, he said, so it did not matter if the ink came off. The commission has declared the result free and fair. But opposition leader Anwar Ibrahim has dismissed the body as a tool of the government. It has no powers to investigate irregularities - that should be done by the police, although they have a poor track record of doing so. It is difficult to assess how much such irregularities may have affected the result. There is a belief among opposition activists that ballot boxes are stuffed with extra votes in secret, but this is impossible to confirm and denied by the government. What is clear is that significant numbers of Malaysians do not accept Prime Minister Najib Razak's victory as legitimate.

The BN secured a simple majority but failed to regain the two-thirds parliamentary majority it lost for the first time in 2008.

Mr Anwar, who called the results the worst in Malaysia's history, said it did not reflect the will of the people.

He said that while his coalition has advised supporters against mass rallies, "we must be allowed to express ourselves properly in stadiums or in the vicinity of a public space".

A protest is scheduled to take place outside the capital, Kuala Lumpur, on Wednesday.

'Failed' elections

Mr Anwar said the authorities had rejected "the true aspirations of Malaysians wanting reform" and accused the Election Commission of being "complicit in the crime" of fraud.

"I don't think they are the best person to assure us that the election is free," he told the BBC.

He added that there were "specific incidents" of voter fraud involving foreign nationals.

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

Some of those who voted in advance said 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.

Ahead of the polls, Malaysia's Election Commission said it had done all it could to keep the polls clean.

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.

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

PM Najib Razak leads the long-dominant coalition Barisan Nasional (National Front)

Anwar Ibrahim leads the three-party opposition coalition Pakatan Rakyat

Key poll issues included corruption, race-based policies that favour ethnic Malays, and the economy

Turnout was estimated at a record 80%, election officials said

In 2008, of the 222 seats in parliament the BN won 140 and the opposition won 82 Q&A: Malaysia elections Profile: Najib Razak Profile: Anwar Ibrahim

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.

'Tsunami'

Mr Najib, 59, was sworn in as prime minister by Malaysia's king on Monday afternoon.

Speaking after his coalition's election victory, he 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".

"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%, which would make Mr Najib the first leader to win with a minority of the popular vote, AFP news agency reported.

Malaysian shares reacted positively to news that the BN had won.

The FTSE Bursa Malaysia KLCI Index jumped as much as 9.5% to a lifetime high of 1,826.22 in early trade on Monday, before ending the day higher by 3%.

The local currency, the ringgit, hit a 10-month high.