Over the next six months, the popular mayor of Indonesia’s third-largest city, the country’s minister for social affairs, and the former commander of the army strategic reserves will hit the campaign trail ahead of the regional polls.

Bandung Mayor Ridwan Kamil, minister Khofifah Indar Parawansa and retired army general Edy Rahmayadi are among the more visible candidates vying to be governor of West Java, East Java and North Sumatra respectively.

The June elections, touted as a curtain-raiser for the presidential election in April next year, will also feature other generals from the army and police, a veteran actor, founding president Sukarno’s grand-daughter, and even an old boy of Singapore’s Raffles Institution (RI).

Their names were released by the general elections commission after registration for candidates closed at midnight on Thursday.

Around 160 million voters in 171 regions – 17 provinces, 39 cities and 115 regencies – will head to the polls on June 27 in the biggest single-day election to be held in Indonesia.

About 90 million live in West Java, East Java and Central Java, with 10 million more in North Sumatra, making the four provinces key election battlegrounds.

But the contest to watch is the gubernatorial race in West Java province, which is home to 32.8 million voters – the largest electorate in the country – and where there will be a four-way fight. It was also where Gerindra Party chief Prabowo Subianto had gained ground against President Joko Widodo during the last presidential election in 2014.

Mr Ridwan, 46, an award-winning architect who entered politics as an independent candidate, is backed by NasDem, the National Awakening Party, United Development Party and Hanura. His running mate is 48-year-old Tasikmalaya regent Uu Ruzhanul Ulum.

Also contesting in West Java are actor Deddy Mizwar, 62, and Purwakarta regent Dedi Mulyadi, 46, who are backed by Golkar – Indonesia’s second-largest political party – and the Democratic Party.

Rounding off the field is ex-army general Sudrajat, 68; and Bekasi Mayor Ahmad Syaikhu, 52, who are endorsed by a Gerindra coalition.

Alliances for local elections are often fluid, and while the groups behind most of the candidates this year are largely consistent with current loyalties, there are several groups with a mix of parties from both the ruling and opposition coalitions.

The opposition Gerindra and Prosperous Justice Party (PKS) have an alliance with the National Mandate Party (PAN) – a member of the government coalition – for the contests in West Java, Central Java and North Sumatra.

In North Sumatra, the Gerindra, PKS and PAN grouping is backing Mr Edy, 56, and his running mate Musa Rajekshah, 43, who are also supported by Golkar, NasDem and Hanura from the ruling coalition.

They will be up against the PDI-P-backed pairing of Mr Djarot Saiful Hidayat, 55 – Jakarta’s former deputy governor who replaced Basuki Tjahaja Purnama as governor after the latter was jailed for blasphemy – and Mr Sihar Sitorus, 49; and the pairing of Simalungun regent Jopinus Ramli Saragih, 49, and his running mate Ance Selian, who are backed by a Democrats coalition.

Meanwhile, PAN is also part of a Golkar-led alliance behind Ms Khofifah, 52, and her running mate Emil Dardak, 33, an RI alumnus who has been regent of Trenggalek since 2016. The pair are contesting the East Java gubernatorial election against Deputy Governor Saifullah Yusuf, 53, and former president Sukarno’s grand-daughter Puti Guntur Soekarno, 46.

As the daughter of Sukarno’s eldest son Guntur – and former president Megawati Sukarnoputri’s niece – Ms Puti is a third-generation blue-blood politician whose family name still attracts widespread support across Indonesia.

Political alliances in Indonesia are often described as inconstant, with shifting loyalties common among party elites who may be allies today but rivals tomorrow.

Analysts attribute the odd alliances to the election Bill passed by Parliament last year, which not only preserves Indonesia’s more recent practice of open elections, but also the presidential thresholds for the upcoming general election.

This means political parties will need at least 20 per cent of the seats in Parliament, or a minimum 25 per cent share of the popular vote, before they can nominate a presidential candidate in 2019.

With the higher thresholds, the presidential contest in 2019 will be a tighter contest. So unless there is a major shake-up in the current coalitions, where the ruling group has almost 70 per cent support in the House, it will likely be a two-horse race next year, with Mr Joko pitted against Mr Prabowo once more.

Indonesian Survey Institute executive director Dodi Ambardi said the parties are trying to consolidate at the regional elections so they can have more influence in the presidential race next year. “The party elites will expect regional leaders they help get elected (in June), to support the acquisition of votes in 2019 or, at the very least, refrain from hampering their efforts.”