Indonesia’s Election Commission says the official count from last month’s presidential election shows President Joko Widodo won 55.5 per cent of the vote, securing him a second term.

The official result from the April 17 election was completed early Tuesday and was almost the same as the preliminary “quick count” results drawn from a sample of polling stations on election day.

Widodo’s challenger for a second time, former general Prabowo Subianto, refused to accept defeat and declared himself the winner last month.

Although independent observers and analysts have said the poll was free and fair, Subianto’s campaign team has made accusations of “massive cheating and irregularities” during the vote and vote-counting.

Indonesian presidential candidate Prabowo Subianto declared himself the winner of last month’s election, based on his campaign’s own counts. (Dita Alangkara/Associated Press)

“We reject the results of the presidential election,” said one of the witnesses for Subianto Tuesday. “This refusal is a moral responsibility for us to not give up the fight against injustice, fraud, arbitrariness, lies, and any actions that will harm democracy.”

Under Indonesia’s election law, Subianto can dispute the results at the Constitutional Court.

He and members of his campaign team have said they will mobilize “people power” for days of street protests rather than appeal to the court because they don’t believe it will provide justice.

In a video released after results were announced, Subianto again refused to concede defeat but called on supporters to refrain from violence.

Police this month have arrested 31 Islamic militants they say planned to set off bombs during expected street protests against the election result.

Indonesia’s election supervisory panel has dismissed two official complaints of election cheating, on grounds of insufficient evidence.

Mobile police brigade officers stand guard outside the General Election Commission headquarters ahead of the announcement of the presidential election results Monday. (Willy Kurniawan/Reuters)

Tens of thousands of police and soldiers are on high alert in the capital Jakarta, anticipating protests from Subianto’s supporters.

Heavily armed security stood guard outside the election commission in central Jakarta, some accompanied by police dogs.