JAKARTA: Indonesians vote Wednesday in the country's most pivotal presidential election since the downfall of dictator Suharto, with Jakarta governor Joko Widodo and an ex-general with a chequered human rights record in a tight race.
Voters face a stark choice between Widodo, the first serious presidential contender without deep roots in the Suharto era, seen as likely to strengthen democracy, and Prabowo Subianto, who critics fear may shift Indonesia back towards authoritarian rule.
Since Suharto's downfall in 1998 after a three-decade dictatorship, Indonesia has transformed into a freewheeling democracy.
However corruption has flourished among the new political class, and nostalgia is growing in some quarters for a return to an era of stronger rule.
"This is going to be an election that determines whether Indonesia moves forward or starts to look backwards," said Paul Rowland, an independent political analyst based in the capital Jakarta.
Several months ago Widodo, known by his nickname Jokowi, looked to be on a smooth course to the presidency of the world's third-biggest democracy, an archipelago of more than 17,000 islands, with about 190 million eligible voters.
Swing voters crucial
But after a polarising campaign, Widodo's once-huge poll lead has shrunk considerably.
He was targeted by a flood of smears, including that he is not a Muslim - a serious charge in the world's most populous Muslim-majority country.
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 for about three weeks.
Whoever wins will be the country's second directly-elected president after Susilo Bambang Yudhoyono, who steps down this year after a decade of stable but often indecisive rule.
He has served two terms of five years each and is constitutionally barred from running for a third.
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.
Widodo, a former furniture exporter, shot to national prominence when he was elected Jakarta governor in 2012, winning legions of fans due to his humble background and common touch.
The 53-year-old used to make regular tours of the metropolis's slums in casual clothes, and was praised for initiating projects to tackle the city's myriad problems.
"He used to be a poor person like me, he better understands the difficulties of our lives than other leaders, who are all rich," said Emi, a 53-year-old drinks vendor, who like many Indonesians goes by one name.
However doubts have also been raised about whether a man with no experience in national politics is ready to be president.
Roots in authoritarian past
Prabowo, in contrast, was a top general in the Suharto era and has admitted ordering the abduction of democracy activists in the dying days of authoritarian rule in 1998. He used to be married to one of the dictator's daughters.
The 62-year-old has played up his military background to appeal to a yearning for a strong leader, which - along with a slick campaign and the backing of several Muslim parties - helped him close the gap on Widodo.
Prabowo's speeches have been marked by fiery, populist rhetoric and sharp criticism of foreign influence in Indonesia. But it is his comments about democracy that have caused the most alarm.
During a talk at a Jakarta cultural centre, he reportedly said that Western-style politics "doesn't suit" Indonesia, including direct elections.
For the United States, an ally of Indonesia, a Prabowo victory could prove awkward. He was denied a visa to the country in 2000, reportedly because of his rights record.
Investors are hoping for a Widodo win, seeing him as a potential reformer, and the rupiah has fallen heavily in recent weeks as Prabowo has gained ground.
Despite the concerns, the ex-general's strongman appeal has won over many voters.
"Only a firm leader can bring prosperity to this country," said Rismaya, a 42-year-old textile shop owner, who also goes by one name. "Hopefully Prabowo can return the country to the time of Suharto."
Jokowi: meteoric rise of a political outsider
Prabowo: ex-general with a dark past