How do you organise free and fair elections in a sprawling developing country beset by political corruption, bureaucratic incompetence and organisational inefficiency?

For Indonesia – and its 193 million voters – the answer lies in the vast number of polling stations, the use of a metal nail (not a pen or a machine) for voting, 1.6 million bottles of halal certified ink and the practice of counting votes in public.

On April 17, the world’s third most populous democracy is holding simultaneous presidential and legislative elections for the first time. It will be world’s biggest direct presidential elections (because the US uses an electoral college) and one of the most complicated single-day elections in global history.

By contrast, India, which is the world’s biggest democracy, is conducting its parliamentary elections through a rolling regional process over six weeks in April and May.

As the Lowy Institute’s new infographic highlights, the scale of Indonesia’s electoral process is mind-boggling, with five separate elections at once, for the president, both houses of parliament, provincial legislatures and district/city councils.

Altogether, there are more than 245,000 candidates running for more than 20,000 national and local legislative seats across hundreds of islands, in addition to the headline contest between President Joko Widodo and challenger Prabowo Subianto.

Despite the logistical challenges and the government’s poor reputation for coordination, the election commission (KPU) has a surprisingly good track record of delivering fair elections, with the results ultimately accepted by politicians and the public alike. That is thanks, in part, to the unique way in which it organises elections. The KPU will operate more than 800,000 polling stations, with each one catering to 200-300 voters. Some six million temporary election workers will be running the polling stations and many are serving the community in which they live.

Altogether, there are more than 245,000 candidates running for more than 20,000 national and local legislative seats across hundreds of islands, in addition to the headline presidential contest.

Dispersing voters across so many polling stations makes it hard for anyone to systematically – and convincingly – stuff ballots in national elections.

Another important quirk is the use of metal nails for voting. Rather than mark their choice with a pen or pencil, which can lead to disputes about the validity of votes, Indonesians punch a hole in the ballot paper to select candidates (the Indonesian verb for voting, “coblos”, literally means “to punch”).

To prevent people from trying to vote in two different places, officials dip voters’ fingers in temporarily indelible ink, which is halal certified to ensure it is acceptable to the 90% of Indonesians who are Muslims.

Soon after polls close on election day at 1pm, election officials will count the votes in public at each polling station, holding up every ballot paper so witnesses can see the sunlight shining through where the nail has been punched. This open process allows opinion pollsters to carry out “quick counts”, which are based on a statistically significant sample of real votes (unlike exit polls, which are simply another survey). These quick counts have in the past usually proved reliable estimates of the final results, except where unscrupulous actors have deliberately falsified them.

Indonesian election mascot with the all important nail

At the last presidential election, in 2014, the KPU also uploaded the results from each polling station to its website, allowing one group of civic minded, tech-savvy young Indonesians to perform their own full count by uploading and collating all the data.

So while the KPU can take one month to complete its full count and check, known as a recapitulation, voters should have a good indication of the results before then, and a means to see if there has been any manipulation.

The police and the military, which number over 400,000 personnel each, are banned from voting to ensure their neutrality – a stark contrast from Thailand, where the military government set the rules for the recent, highly questionable, election (The frustrated wait for Thailand’s election outcome).

It is far from a perfect process and there are often legal challenges to the results. Plenty of politicians and others try to nobble voters, despite strict electoral rules and oversight from the law enforcement agencies, civil society and two formal election oversight bodies (in addition to the KPU). Vote buying, where candidates or their agents hand out cash, cooking oil and rice, is widespread, with up to one third of Indonesians receiving such a bribe, according to one study.

But it is not clear how effective such methods are, particularly for national elections. Secret ballots mean that those handing out cash have no reliable means to check who voters have chosen.

The KPU – and its supporters in civil society – are trying hard to ensure that this is one day on which the Indonesian people, not the politicians, will have the last say.

Just ask Munafri Arifuddin, who ran uncontested last year as mayor of Makassar, a thriving city of more than 1 million people in Sulawesi, with the backing of 10 political parties in a blatant establishment stitch-up. The electorate’s response? They voted by 53%-47% for none of the above, forcing a re-run of the election in 2020.