Tens of millions of Indonesians will vote on Wednesday in regional elections seen as a gauge of President Joko Widodo's prospects for re-election next year in the world's third biggest democracy.
Widodo, known as Jokowi, is popular across the 17,000-island archipelago. But he has struggled to keep his economic growth plans on track, while the growing power of hardline Islamist groups who oppose him could throw up a formidable challenge.
Some 152 million registered voters -- more than half of Indonesia's 260 million-strong population -- are eligible to cast a ballot for 171 mayors, regional leaders and provincial governors.
A key battleground is West Java, the county's most populous province, where voters will decide whether to back Jokowi's allies.
A loss in the region could be a blow to the 57-year-old leader as he gears up for an expected repeat of the 2014 contest that saw him beat retired general Prabowo Subianto for the presidency.
Subianto is believed to be planning to run again in the April 2019 presidential election.
Authorities tightened security across the archipelago as voting got underway in the morning, with polls set to close later in the day. Results are expected by July 9.
Indonesia has been on edge since a series of suicide bombings in the second biggest city of Surabaya last month stirred fears about militancy in the world's biggest Muslim-majority country.
Last week a cleric seen as a top messenger for the Islamic State group in Indonesia was sentenced to death for masterminding a 2016 suicide-and-gun attack in central Jakarta -- raising concerns about retaliatory attacks by his supporters.
The political power of hardline Islamist groups is at unprecedented levels in officially pluralist Indonesia.
That power was highlighted when Jakarta's first ethnically Chinese and Christian governor -- a key Jokowi ally -- lost his re-election bid last year over blasphemy allegations that later sent him to prison.
Supporters of Basuki Tjahaja Purnama's Muslim challenger galvanised the opposition and drew hundreds of thousands of protesters onto the streets of the capital to denounce him.