BOTH candidates have claimed victory in Indonesia's presidential election, suggesting there could be a drawn-out constitutional battle to decide who will next lead the world's third-largest democracy.

Just a few hours after voting closed, Jakarta governor Joko 'Jokowi' Widodo said he had won, based on what are widely seen as ­independent quick counts of more than 90 per cent of the votes.

A victory for him would be seen as a triumph for a new breed of politician that has emerged in Southeast Asia's biggest economy and increase the promise of reform in government.

But ex-general Prabowo Subianto, the rival candidate seen as a representative of the old guard that flourished under decades of autocratic rule, pointed to a quick count by other pollsters naming him the winner.

The Election Commission will take about two weeks to declare the results officially and the new president is not due to take office until October.

A senior aide to Jokowi said the party would not take any action such as naming a cabinet until the official result is announced on or around July 22.

The stand-off is unprecedented in Indonesia, which is holding only its third direct presidential election.

In both the previous elections Susilo Bambang Yudhoyono, now the outgoing president, won by a clear margin.