The ex-general who lost Indonesia's presidential election to Jakarta governor Joko Widodo mounted a legal challenge to the result Friday, alleging widespread electoral fraud and irregularities in vote counting.

Prabowo Subianto has alleged that massive fraud tipped the scales in Widodo's favour, but his challenge is directed at the election commission, in part for failing to investigate all allegations of cheating, according to a spokesman.

"We have filed a legal challenge. We submitted evidence of cheating... from 52,000 polling stations," Fadli Zon, another spokesman for Prabowo Subianto's camp, told AFP at the Constitutional Court.

Prabowo has refused to concede defeat despite the elections commission's declaration Tuesday that Widodo won the presidency with 53 percent of the vote.

The former general, who has admitted to ordering the abduction of activists before the Suharto dictatorship fell in 1998, angrily announced his withdrawal from the election Tuesday, only to say Wednesday that he would file an appeal.

"I have chosen to fight on a constitutional platform. It is very very difficult for me to give up in an incorrect and unfair situation," Prabowo said in a video posted on his Facebook page earlier Friday.

Analysts have described the July 9 election as free and fair, calling it the most transparent in Indonesia's history.

Both candidates claimed victory on the election day, leaving Indonesians waiting two weeks for the official vote count to confirm a winner.

The challenge means an even longer drawn-out process, with court officials saying the decision will be delivered by August 21.

Analysts do not expect the court to declare Prabowo the winner -- Widodo won by a substantial 8.4 million votes -- but some have said a revote could be called if strong evidence is presented.

Widodo's team could not be immediately contacted but told AFP earlier they were not concerned about the challenge.

Widodo is moving ahead with presidential preparations, commenting to reporters on Friday about his future cabinet.

The two previous presidential elections, in 2004 and 2009, were also challenged at the court but were thrown out quickly on lack of evidence.

Concerns of impartiality in the court have been raised following the life sentence handed to its former chief justice last month for accepting bribes to fix local election disputes.

But the court is under immense pressure to rule fairly as it tries to restore its image following the scandal.

Widodo is the first elected president with no ties to the political or military elite. The former furniture exporter raised in a riverbank slum has won legions of fans with his man-of-the people approach during his time as Jakarta governor.