Indonesia’s General Election Commission (KPU) confirmed unofficial counts by private pollsters in the April 17 election, giving Widodo a 55.5 percent share of votes against 44.5 percent for Prabowo Subianto.

Widodo won more than 85 million votes of a total of 154 million cast in the world’s third-largest democracy, but Prabowo told reporters he believed there had been widespread cheating, and about 1,000 supporters gathered in a peaceful protest.

The retired general pledged he would “continue to make legal efforts in line with the constitution to defend the mandate of the people.”

Sufmi Dasco Ahmad, legal director of Prabowo’s campaign team, confirmed it planned to contest the result in the Constitutional Court.

On Monday, an election supervisory agency dismissed claims of systematic cheating, citing a lack of evidence, and independent observers have said the poll was free and fair.

Flanked by riot police, Prabowo’s supporters were gathering mainly at the election supervisory agency (Bawaslu) in the heart of the city’s commercial and government district.

“We have a long struggle ahead of us to find the truth in this election,” one of the protest leaders shouted into a megaphone, urging people to remain peaceful.

There was also a small rally at the KPU in support of the election commission.

Chief Security Minister Wiranto told a briefing there had been plans for “massive demonstrations to storm the KPU, Bawaslu, parliament and the state palace.”

He threatened severe punishment for criminal activity and vowed to maintain security while denying that authorities were being draconian.

The KPU announced official results more than a day earlier than expected after working into the early hours of Tuesday, a move that meant the announcement came before planned protests.

A relaxed-looking President Widodo pledged Tuesday to be a leader for all Indonesians.

“We are grateful and proud that amid our differences, we have been mature in keeping the peace,” he said on a visit to a poor neighborhood of the capital.

Ben Bland, director of the Southeast Asia Project at Lowy Institute, said the election showed how identity and religious politics appeared to be increasingly “embedded in the political discourse in Indonesia.”

“The challenge for Jokowi is to try and find a way to defuse tensions,” said Bland, using the president’s nickname.

The reaction of the financial markets was mixed, with stocks up nearly 1 percent and the rupiah off 0.1 percent.

Andry Taneli, a portfolio manager at Ciptadana Asset Management, said stocks had responded positively to the official result.

“On the other hand, there is concern of Prabowo not accepting the result, but we can see everywhere the police and army are ready to ensure security,” Taneli said.

Prabowo had warned that the cheating claims could trigger “people power”-style protests, though ahead of the result he had urged supporters in a video to be “peaceful in our struggle.”

Authorities have tightened security in the capital in a bid to choke off any civil unrest and detained dozens of militant Islamists suspected of planning attacks. Police said they had held or interrogated at least three leading opposition figures for suspected treason.

Police have rolled out extra barbed wire and readied armored trucks and water cannon around the KPU. Some schools in Jakarta have also shut this week and offices allowed staff to work from home.

The losing candidate can lodge a challenge in the constitutional court within three days, otherwise the election panel will officially declare the winner. Prabowo’s challenge to his 2014 defeat by Widodo was rejected.