Both candidates in Indonesia's tight presidential election have claimed victory as votes continue to be counted in the country, which only became a democracy decades ago but is now the third-largest in the world.

According to the Associated Press, Jakarta Gov. Joko Widodo, citing "the three most reputable quick-count surveys," won the election with 52 percent of the vote. His opponent, Prabowo Subianto, a general in his late dictator father-in-law Suharto's army, claims that "other data" puts him ahead of Widodo:

The quick counts tally a representative sample of votes cast around the country and have accurately forecast the results of every Indonesian national election since 2004, including this past April's parliamentary polls. It will be around two weeks before votes are officially tallied and the results announced in Indonesia, a country of 240 million people and the world's most populous Muslim nation.

As reported by the Times of India, about 190 million people were expected to vote in Wednesday's election and that in the last few months of campaigning, Subianto has managed to eat away at Widodo's lead:

Just a couple of months ago, the election was considered firmly in favour of Widodo, who rose from humble beginnings to become the governor of Jakarta with a squeaky-clean political record.

But a late surge by Subianto has vastly improved his chances after he wooed legions of supporters with calls for nationalism despite allegations of widespread human rights abuses during his military career and his connection with Suharto — his former father-in-law.

Polling experts have predicted that the election's outcome will fall on undecided voters.

[Image via AP]