Thousands of soldiers fanned out across Jakarta on Tuesday after the surprise early announcement of official results in Indonesia’s election showed Joko Widodo re-elected leader of the world’s third-biggest democracy.

The election commission had been due to give the final tally of the divisive poll on Wednesday, but the results were revealed early Tuesday with little advance notice amid fears of unrest.

Presidential challenger Prabowo Subianto had warned of possible mass uprisings in response to his claims of widespread cheating.

Tensions have also spiked high since police said last week that they arrested dozens of Islamic State-linked terror suspects, including some who planned to cause chaos by detonating bombs at any post-election protests.

On Friday, the US embassy in Jakarta issued a heightened security alert for Indonesia, the world’s biggest Muslim majority nation.

There was a heavy security presence in Jakarta on Tuesday, including in front of the elections commission office, which was barricaded with razor wire and protected by scores of heavily armed troops.

Subianto, a 67-year-old retired general, has targeted the commission by accusing it of allowing a string of election violations.

The former military man who has strong ties to the Suharto dictatorship that collapsed in 1998, has kept up a steady string of rhetoric since unofficial results for the April 17 poll put bitter rival Widodo ahead by a wide margin.

Widodo, who had held off declaring victory after April polls, confirmed the win on Tuesday.