After a bitterly-fought campaign that saw long-time favourite Widodo's lead shrink dramatically, voters in the world's third-biggest democracy must choose between two starkly different candidates.
A former furniture exporter from a humble background, Widodo is the first serious presidential contender without links to the authoritarian past, who is seen as likely to usher in a new style of leadership and consolidate democracy.
Prabowo, a former son-in-law of Suharto who has admitted ordering the abduction of democracy activists before the strongman's downfall in 1998, has won support with promises of firm leadership in a country where many yearn for a strong leader.
"In terms of Indonesia's democratic journey, this is potentially a very important juncture," said Tobias Basuki, an analyst from the Jakarta-based Centre for Strategic and International Studies.
More From This Section
Several months ago Widodo, known by his nickname Jokowi, looked to be on a smooth course to the presidency of the world's biggest archipelago nation, which is made up of more than 17,000 islands and has about 190 million eligible voters.
But, after a polarising campaign, his once-huge poll lead has shrunk.
The Jakarta governor was targeted by smears, including a claim that he is an ethnic Chinese Christian and not a Muslim, a deeply damaging charge in the world's most populous Muslim-majority country.
A poll out yesterday gave him a lead of just 2.7 percentage points. With surveys showing a large number of undecided voters, analysts say the race is wide open.
A series of "quick counts" by pollsters on the day are expected to give an accurate indication of the winner. Official results are not due out for about two weeks.
Whoever wins will be the country's second directly-elected president after Susilo Bambang Yudhoyono, who steps down in October after a decade of stable but often indecisive rule.
It will be a delicate transition. Growth is slowing in Southeast Asia's top economy, corruption is rampant, millions remain mired in poverty, and fears are mounting that Islamic radicals returning from Middle East conflicts could revive militant networks.