President Joko "Jokowi" Widodo, facing Gen. Prabowo Subianto in a rematch, is widely expected to win a second term when Indonesians go to the polls Wednesday.
Prabowo has pinned his hopes on emphasizing nationalism, appealing to Muslim hard-liners, and promising to double economic growth.
But analysts said Jokowi's strong economic performance, particularly delivering on infrastructure projects and a national health plan, coupled with a predictable opposition campaign, had given his Independent Democratic Party of Struggle (PDI-P) a substantial edge.
And that's reflected in opinion polls.
Campaigning has gone peacefully amid tight security. Firebrand rallies by ultra-orthodox Muslim clerics have paled when compared with those of past elections, amid a realization in Prabowo's camp that such political tactics were unlikely to earn him a victory.
Dirk Tomsa, a senior political lecturer and Indonesian specialist from La Trobe University in Australia, said Jokowi had established his Islamic credentials by choosing Ma'ruf Amin, a conservative favorite among fundamentalist Muslims, as his running mate.
That blunted Prabowo's attacks, and in a nationally televised debate, he even appeared to back down, saying those who accused him of wanting a caliphate, or Islamic state, were wrong, while noting that his own mother was a Christian.
To counter Jokowi on the economic front, Prabowo and his running mate, Sandiaga Uno, promised to double economic growth to 10 percent a year by cutting corporate taxes and opening the Indonesian economy to non-traditional markets.
But analysts said that failed to impress an electorate acutely aware of allegations that Prabowo, the son-in-law of former President Suharto, was allegedly involved in the disappearance of pro-democracy activists in 1997 and 1998, charges Prabowo denies.
Tomsa said Jokowi was now the overwhelming favorite to win the election, aided by a late and unexpected swing back to the president in opinion polls.
"Well, up until now, it looks as if there hasn't been much change in the polls for the last few months, with the exception of the Kompas poll. It looks as if Jokowi still seems to be quite steady in his lead," he said.
A March survey by the Indonesian newspaper Kompas found Prabowo's electability had increased by 4.7 percentage points over the previous six months, to 37.4 percent. Jokowi suffered a decline of 3.4 percentage points, to 49.2 percent.
Jokowi's camp had expected his almost unassailable lead to drop during the later stages of the campaign, a repeat of the election in 2013, when Jokowi's numbers in the opinion polls fell but he defeated Prabowo easily at the ballot box.
But three further surveys conducted in April by the Indopolling Network showed Jokowi had recaptured the lost ground and is expected to win between 54 percent and 57 percent of the vote, while Prabowo may only muster between 32 percent and 37 percent.
"Prabowo has apparently not found the right edge to really weaken him [Jokowi]," Tomsa said. "It looks as if Prabowo has been ramping up the pressure in the last couple of weeks or so with various allegations, but it's only a couple of more days to go and I can't really see how Prabowo can still turn this around."
Prabowo's allegations against Jokowi include a lack of impartiality by poll organizers and that voter fraud might undermine the final result. Jakarta-based risk security firm Concord Consulting has said there is no evidence to support such claims.
Prabowo made similar claims following his defeat in 2013 and launched legal action with the General Election Commission and the Constitutional Court, which failed.
Of Indonesia's population of 264 million, about 190 million are eligible to vote. It remains the world's most populous Muslim country, ahead of Pakistan and India. But in this election it is living standards and pocketbook issues that have grabbed voter attention.
David Welsh, country director for the Solidarity Center in Indonesia, said most trade unions were focusing on what type of commitment Jokowi and Prabowo had to offer in an economy dominated by multinational companies but found wanting in the application of domestic labor laws.
"Trade unions in Indonesia remain either virtually, or in fact, the largest segment of civil society in the country, with crucial issues at play," he said.
"In terms of predicting a winner, certainly the majority of trade unions are supporting the current incumbent, but it's been a contentious election. We'd like to see more focus on bona fide trade union issues, human rights issues, [and] labor rights issues," Welsh said.