Indonesia's Joko Widodo won another term as president of the world's third-biggest democracy, official results showed Tuesday, after his rival Prabowo Subianto, a retired general, alleged widespread cheating.
The elections commission was expected to announce the final tally of the 17 April poll on Wednesday in the Southeast Asian nation of 260 million.
But amid fears about unrest and street demonstrations in response to the final count, the official result was released early with little advance notice.
Widodo and his vice-presidential running mate Ma'ruf Amin won the election by a 55.5 percent to 44.5 percent margin over Subianto and Sandiaga Uno, the commission said.
Some 85.6 million Indonesians cast their ballot in favour of Widodo out of about 154 million voters, it added.
"This ruling...will be effective immediately," the commission's chair Arief Budiman said in a live-streamed announcement that was broadcast on major media.
Widodo, 57, had been widely predicted to win according to unofficial results.
But Subianto, 67, has vowed to challenge any victory for his rival, alleging widespread voter fraud and cheating, and warned that it could spark street protests across the world's biggest Muslim-majority nation.
Widodo held off declaring victory after unofficial results emerged last month as Subianto insisted he was the archipelago's next leader.
Subianto lost a 2014 presidential bid to Widodo, which he unsuccessfully challenged in court.
It was not immediately clear if Subianto would formally challenge the results announced Tuesday.
However, Azis Subekti, a witness for Subianto's camp, refused to sign and validate the official election results.
"We won't surrender in our fight against injustice, fraud and abuse," he was quoted as saying by Indonesia's Detik.com.
Some 32,000 security personnel were being deployed across the capital Jakarta, including in front of the elections commission's downtown office, which has been barricaded with razor wire.
Tensions have also been high since police said Friday that dozens of Islamic State-linked terror suspects have been arrested – including some who had allegedly planned to detonate bombs at political demonstrations after the election results announcement.
Last month, Indonesia held its biggest-ever election, a massive one-day poll with more than 190 million registered voters and a record 245,000 candidates vying for the presidency, parliamentary seats and local legislator positions.
Election officials have discounted claims that the result was affected by voter fraud and widespread cheating.
"The scale of abuses and errors in the conduct of the election are clearly very minor overall," Jakarta-based political analyst Kevin O'Rourke said before Tuesday's official results.
"(Subianto) and his camp are harping on minor deficiencies and very micro problems, clearly in an attempt to sway public opinion and delegitimise Widodo."
This year's campaign was punctuated by bitter mudslinging and a slew of fake news online – much of it directed at the presidential contenders.
Subianto – who has strong ties to the Suharto dictatorship that collapsed in 1998 – was pilloried online for his refusal to concede and over his claims to have won the poll. - AFP