Prabowo Subianto (L) is challenging the win by Joko Widodo (R) in the July 9 presidential poll

AFP, file photo

Indonesian ex-general Prabowo Subianto will kick off a last-ditch bid to overturn the results of the country's closely-fought presidential election, when a court starts examining his complaints of widespread voting irregularities.

Joko Widodo was last month declared the winner of the race to lead the world's third-biggest democracy against Prabowo, a controversial former military figure with deep roots in the era of dictator Suharto.

Mr Widodo, a former furniture exporter known by his nickname Jokowi, won legions of fans with his down-to-earth style as Jakarta governor and is the country's first leader from outside the political and military elites.

Mr Subianto also declared victory at the July 9 presidential election, leaving Indonesians waiting two weeks until the lengthy vote count across the archipelago was complete and official results confirmed Mr Widodo's victory.

His team has filed a lengthy complaint against the election commission with the Constitutional Court, which rules on poll disputes.

They claim that Mr Subianto is the true winner of the election, that fraud occurred at some 52,000 polling stations which had affected 21 million votes, and that election officials failed to order recounts in numerous places where they should have.

Hundreds of riot police will be deployed at the Constitutional Court in the capital Jakarta for a preliminary hearing for the case on Wednesday morning.

A nine-judge panel will initially decide whether the documents from Prabowo's team are in order or if they need to be revised and submitted again.

It has until August 21 to issue a ruling, which is final and binding.

"We are very optimistic that the court will be on our side," Tantowi Yahya, a spokesman for Prabowo's campaign, said.

While the presidential election was the closest since three decades of authoritarian rule came to an end in 1998, Mr Widodo still won by a margin of six percentage points, or more than eight million votes.

The court has never moved such a large chunk of votes from one candidate to another and observers don't expect it to do so this time, or to order a full recount of the vote.

"It's very unlikely to succeed," said Tobias Basuki, an analyst from Jakarta-based think-tank the Centre for Strategic and International Studies.

The losers in Indonesia's two previous direct presidential elections since 1998 both sought to challenge the result in court but the cases were quickly thrown out due to lack of evidence.

There have been concerns about the court's impartiality after its former chief justice was jailed for life in June for accepting bribes to influence rulings on regional election disputes.

However the heightened public scrutiny of the court is expected to mean that the institution will be at pains to appear squeaky clean.