Indonesia heads to the polls on Wednesday in the largest single-day democratic election in the world, as voters face a choice for president between an everyman incumbent and his strongman ex-general challenger.

President Joko Widodo is hoping for a repeat performance of the 2014 election in which he beat the same contender, former special forces commander Prabowo Subianto, by a six percentage point margin.

At the same time as the presidential election, voters will also be asked to choose from candidates for the country’s 560-seat national parliament, the People's Representative Council.

With more than 192 million eligible voters and 245,000 candidates vying for selection, it makes for what experts have described as one of the most logistically challenging elections in human history.

Who are the presidential candidates?

Joko Widodo, more commonly known as Jokowi, is a former furniture salesman whose victory in 2014 was seen as finally breaking the hold on power of Indonesia’s deeply entrenched military and political elites.

Mr Jokowi is seen as a progressive figure and has delivered a solid 5 per cent economic growth during his term in power, while launching major infrastructure projects including new ports, airports, toll roads and a first mass transit network for congested Jakarta.

Delivering ballot boxes to Indonesia's hard to reach places Show all 10 1 /10 Delivering ballot boxes to Indonesia's hard to reach places Delivering ballot boxes to Indonesia's hard to reach places Workers transport ballot boxes to Bonto Matinggi village, South Sulawesi AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Army and police guards guide the delivery of ballot boxes in remote East Java AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Election officials deliver ballot boxes to a remote village in Southern Aceh AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Workers deliver ballot boxes to Bandung in West Java amidst heavy flooding AP Delivering ballot boxes to Indonesia's hard to reach places Workers deliver ballot boxes to villages outside the city of Bogor EPA Delivering ballot boxes to Indonesia's hard to reach places Election officials load ballot boxes for delivery to a remote village in Southern Aceh AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Workers deliver ballot boxes to remote villages in Papua province AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Workers deliver ballot boxes by boat to remote villages in Papua province AFP/Getty Delivering ballot boxes to Indonesia's hard to reach places Workers load ballot boxes onto a lorry in North Sumatra AP Delivering ballot boxes to Indonesia's hard to reach places Army and police guards guide the delivery of ballot boxes in remote East Java Reuters

But he has received criticism for dropping a pledge to clamp down on human rights abuses, while at the same time being accused of opening up Indonesia to foreign - particularly Chinese - influence in the name of economic advancement.

Mr Jokowi, a moderate Muslim, has struggled to bring on board the increasingly vocal hardline Islamic groups that hold some sway in the country. Though it has a secular constitution, Indonesia’s population is about 80 per cent Muslim, making it the largest Muslim-majority nation in the world.

Prabowo Subianto is very much a part of the elite which voters were seen as rejecting in 2014. His father was a prominent economist and served in the cabinet of both the country’s long-reigning dictatorial leaders of the 20th century, Sukarno and Suharto.

It was in the aftermath of Suharto’s deposition as president that Mr Prabowo was dismissed from the military, after soldiers under his command kidnapped student activists, 13 of whom were never seen again.

Mr Prabowo has cultivated a strongman image and ties with hardline Islamist groups in the hope of boosting his chances. He has stoked nationalist sentiment, mostly by suggesting Indonesia will break apart or fall under foreign control if it doesn’t have a powerful figure at the helm.

What are the polls saying?

Most pollsters expect Mr Jokowi to return for a second term, although there are concerns that - as with the 2016 US election and the UK’s vote to leave the EU, surveys may not be capturing the true state of affairs on the ground.

Polls have been giving Mr Jokowi a double-digit lead, with a recent survey suggesting he might win by 20 percentage points. But there is anecdotal evidence that some Prabowo supporters are not declaring their real intentions, said Alexander Arifanto, a researcher at the S Rajaratnam School of International Studies in Singapore.

Hard-line Islamic groups that were behind massive 2016 street protests against Jakarta's Jokowi-allied governor have campaigned effectively for Mr Prabowo for months, Arifanto said. And there is anecdotal evidence, he said, that some Prabowo supporters are not declaring their true voting intentions in surveys.

“[Prabowo] Subianto’s campaign has had more zeal and spirit than Jokowi's side,” he said, adding that “the polls haven't been able to capture the grassroots dynamics”.

Incumbency is ultimately expected to play the biggest factor in voters’ decision. Mr Jokowi has emphasised his achievements so far - but there has been a drop in real income for nearly 40 million farmers, who account for a third of the labour force.

Mr Jokowi, 57, is “a manifestation of the new Indonesia, of the land of opportunity in which democratic opening has made it possible for anyone to come up to the top”, said Dewi Fortuna Anwar, a politics expert at the Indonesian Institute of Sciences.

"If Jokowi wins again, clearly that is a continued reaffirmation of that as well as an endorsement of his track record for the past five years," she said.

How have their campaigns played out?

Mr Jokowi and Mr Prabowo have chosen to spend their final days of campaigning in very telling ways.

The incumbent, facing accusations of not being Muslim enough, travelled to Saudi Arabia over the weekend and met with King Salman, a popular figure among ordinary Indonesians.

Dressed in white robes, Mr Jokowi also performed a minor pilgrimage to Mecca, and expressed his personal gratitude to the kingdom for allotting an additional 10,000 spaces for Indonesians to attend the annual haj.

Meanwhile, Mr Prabowo - accused of having an explosive temper and presiding over human rights abuses - attended an exhibition of cat photos by a Dutch photographer.

According to a statement from his campaign team, the 67-year-old presidential candidate giggled as he was presented with a portrait of his own cat “Bobby”, who has 36,000 followers on Instagram. “Wow is this the photo of Bobby? It's very nice,” Mr Prabowo apparently said, again according to the statement.

When is the vote?

Polling stations will open at 7am (10pm on Tuesday in GMT) in the east and close at 1pm (6am GMT) in the west.

Nearly 350,000 police and military personnel, in addition to 1.6 million paramilitary officers, will fan out across the archipelago of 17,000 islands to safeguard the vote, alongside more than 10,000 people who have volunteered to crowd-source results posted at polling stations in a bid to reduce the opportunities for fraud.

The opposition has already said it has uncovered data irregularities affecting millions on the electoral rolls and has vowed to take legal action if its complaints are not resolved.

Support free-thinking journalism and attend Independent events

But the biggest issue of corruption in Indonesia’s politics, and one that won’t be resolved in time for this election at least, is the matter of money-politics.

The country is one of the worst offenders in South Asia, experts say, with the envelopes of cash commonly handed out to voters over the course of the six-month campaign amounting to huge figures.

These expenses then lead to rampant corruption once candidates are in power, activists say, as the victors seek to recoup the money they and their backers paid out. The price of a successful run for one of the 560 national assembly seats is about 10 billion rupiah, or £540,000, according to the former deputy chief of the Corruption Eradication Commission.

Exit polls will be issued about two hours after polling ends on Wednesday, followed by a series of unofficial “quick counts”, and the winning presidential candidate will likely be known by the end of the day. The General Election Commission will release the final official results in May.