Defeated Indonesian presidential candidate Prabowo Subianto is set to lodge a challenge to the result of the April 17 election in the Constitutional Court on Friday after complaining that the vote was rigged.
President Joko Widodo won 55.5% of votes in the poll to lead the world`s third-biggest democracy, beating retired general Prabowo, who got 44.5%, the General Election Commission (KPU) said on Tuesday.
After the announcement, Prabowo repeated earlier claims that there had been widespread cheating in favour of the incumbent and thousands of his supporters demonstrated in the capital this week to protest against the result.
Eight people were killed, including three teenagers, while 737 were hurt in two nights of rioting, Jakarta Governor Anies Baswedan said.
The election agency has said there was no evidence of systematic cheating and independent observers have said the poll was free and fair.
"The process of submitting the dispute lawsuit and other legal efforts are steps to ensure that we can carry election results that are free and fair," Prabowo`s running mate, Sandiaga Uno, told reporters.
The last ranks of protesters dispersed early on Thursday, but opposition supporters are expected to gather again on Friday near the court, which is close to the presidential palace in the heart of the capital.
Police have arrested hundreds of people accused of taking part in the riots or provoking violence, two of whom were members of a militant group that had pledged support for Islamic State, national police spokesman Muhammad Iqbal said.
Police had also found envelopes containing money, suggesting instigators had paid some of the rioters, Iqbal said, adding that tests showed some of the suspects had taken the stimulant methamphetamine.
The Constitutional Court must make a ruling on the challenge 14 days after it considers the plaintiff has provided sufficient documentation. The Election Commission should resolve the dispute by June 15.
Widodo has warned of tough action against those instigating riots, while Prabowo has called for peaceful protests and restraint.
Prabowo also lost the 2014 presidential election to Widodo by a slimmer margin and had objected to that result, lodging a complaint with the Constitutional Court that was rejected.
The government has deployed 58,000 police and soldiers across Jakarta to maintain security and put temporary blocks on some social media to prevent unrest sparked by fake news.