DEPOK, Indonesia (Reuters) - Unofficial counts in Indonesia’s regional elections on Wednesday put candidates favoring President Joko Widodo ahead in three provinces on Java island, home to more than half of the population of the world’s third-largest democracy.

An Indonesian woman shows her ink-stained finger after casting her vote during regional elections in Tangerang, west of Jakarta, Indonesia June 27, 2018. REUTERS/Willy Kurniawan

But candidates backed by the opposition fared better than expected in the elections, which is an important pointer for national parliamentary and presidential races in 2019.

Some hardline Islamic leaders have publicly called for the ousting of Widodo, who has pledged to protect Indonesia’s tradition of pluralism and moderate Islam in the officially secular country.

Widodo is expected to run again for the presidency in 2019, against retired general Prabowo Subianto, who was narrowly defeated in the last presidential vote in 2014.

Political analysts said the mixed results meant Widodo, who has mostly enjoyed high approval ratings, may face a tougher fight next year than expected.

“This is likely to be a wake-up call for Jokowi that he can’t be too confident and has to be more aware of people’s sentiments,” said Keith Loveard of Concord Consulting Indonesia, referring to the president by his nickname.

On Wednesday, elections were held for 171 city mayors, regents, and provincial governors across the world’s biggest Muslim-majority country.

The regional election results will help underpin support for presidential candidates since local-level leaders are often best placed to mobilize voters. Presidential candidates need to be declared by Aug. 10.

The extent of Islamist influence on voters will be closely watched after a bitterly fought contest for the Jakarta governorship last year exposed deep religious and ethnic rifts.

Slideshow ( 16 images )

In West Java province, a conservative area with a population of 47 million, Ridwan Kamil, a 46-year-old, U.S.-educated architect, had won 33 percent of the vote, inching ahead of rivals, according to quick counts, based on unofficial tallies of a sample of votes.

Kamil, the former mayor of Indonesia’s third-largest city of Bandung, has won praise for his progressive approach to governance, but was opposed by hardline Islamist groups questioning his Islamic credentials.

Kamil has not explicitly voiced support for Widodo.

HIGH ALERT

Indonesia is on high alert after a series of suicide attacks in Surabaya city killed 30 people last month, in the deadliest militant Islamist attacks in more than a decade.

Last week, one of Indonesia’s highest-profile Islamic State supporters was sentenced to death for his involvement in a series of earlier attacks, and experts have warned of a risk of retaliation by supporters.

The security forces have deployed more than 170,000 personnel to secure the polls.

There have been no reports of unrest and police declared as false rumors on social media of voter intimidation in some parts of the country with sizeable ethnic Chinese communities.

At some voting stations in Java and on the resort island of Bali there was a festive feel, with polling booths decked out in a World Cup theme and election officials dressed in soccer jerseys.

More than 160 million people are registered to vote.

Some voters complained that religious had figured too prominently in the election, and candidates should have focused more on bread-and-butter issues.

“Politics cloaked with religion is very obvious here,” said Arma Putra, 26, an unemployed resident of Bekasi town in West Java.