In the space of three weeks, Indonesian Democrat Party-Struggle (PDI-P) candidate Joko Widodo has seen his almost unassailable lead for the July 9 presidential election whittled down to what is shaping up to be a nail-biting climax.
Early this month, when he was leading by 10 per cent, it was still Mr Joko's race to lose. But the gap has kept on closing, with the respected Centre for Strategic and International Studies (CSIS) now putting him only 0.6 per cent ahead in its latest, unpublished poll.
Two other surveys this month by Lembaga Survei Indonesia and, most recently, Indo Barometer, have Joko hanging on by 3 per cent and 3.4 per cent respectively, while a fourth poll gives Great Indonesia Movement (Gerindra) rival Prabowo Subianto the edge for the first time.
With a general margin of error of 3 per cent, one thing seems clear: It is the 10 per cent of undecided voters who will determine the outcome and, at this point, they are breaking in favour of Mr Prabowo.
"Prabowo may top the polls, but he could lose the election because of the clear split between rural voters who support Joko and the higher-income urban voters who support Prabowo," says political analyst Marcus Mietzner.
While surveys are based on the 50:50 division between rural and urban dwellers, it is the village population that always has the higher election turnout.
Mr Joko's numbers appear to be holding up well in vote-rich East and Central Java, but they have undergone a collapse in Sumatra and a marked decline in West Java and Banten.
Whatever went wrong?
Much of the problem has to do with PDI-P's failure to mobilise its electoral machinery - that was the case as well in the April legislative elections, when the party did not come close to meeting ballot box forecasts.
In fact, it is difficult not to see Mr Joko's campaign team as a group of earnest, well-meaning amateurs trying to take on what one analyst calls "a ruthless, well-funded and disciplined machine supported by a very effective Islamist network".
What might have helped Mr Prabowo has been the decade of weak governance under President Susilo Bambang Yudhoyono.
For all of Mr Joko's simple appeal, he is not seen to offer the strength of leadership that voters quietly yearn for - even among the young.
PDI-P leader Megawati Sukarnoputri has been criticised for not getting more involved in the campaign. Yet, if she did, it would only reinforce Mr Prabowo's claims that Mr Joko is her puppet.
She did feel concerned enough to bring in secretary-general Tjahjo Kumolo to head the presidential campaign team in place of her daughter, Puan Maharani, who got much of the blame for the party's poor showing in April.
But with Mr Kumolo not doing much to rouse the party either, staunch Jokowi ally Luhut Panjaitan formed Bravo Five, a 70-strong support group that includes 21 other retired generals and 40 civilians, to try to keep the campaign on track.
While the CSIS poll has not been made public so far, it was the reason Ms Megawati felt compelled to call a recent meeting of party regional leaders in the East Java city of Malang to lay down the law.
Ms Puan, PDI-P's parliamentary head, does not appear to have been listening.
She recently spent two hours campaigning in the West Papua port city of Sorong - then retired to a luxury Raja Ampat resort off the north-western coast for a four-day break.
There is no question that Prabowo and his financier-brother Hashim Djojohadikusumo have worked hard to get to a point where they are in striking distance of realising their late economist-father's ambition of seeing his soldier-son become president.
But it is just as clear that Gerindra and its coalition allies have been employing primordial tactics to tarnish Mr Joko's common-man image, questioning his Muslim credentials and even accusing him of being a Christian of Chinese descent.
Most of the dirt has appeared in an obscure tabloid sent to boarding schools run by mass Muslim organisation Nahdlatul Ulama (NU), which is mostly affiliated with the National Awakening Party (PKB), one of three parties in the Jokowi coalition.
As crass as it might seem to educated voters, the campaign - orchestrated to some degree by the syariah-based Prosperity and Justice Party (PKS) - has had an impact, causing NU branch offices to be flooded with queries about Mr Joko's background.
Playing on religious sensitivities seems a rather bizarre tactic when brother Hashim and the rest of Mr Prabowo's family are Christian. But Dr Yudhoyono had a similar problem in 2004 simply because of his wife's name - Kristiani.
It isn't clear the extent to which the smear campaign has affected the poll numbers, or whether other, more pragmatic considerations have come into play, as the country's first two-horse presidential race goes down to the wire.
The three debates so far have been collectively inconclusive, with Mr Prabowo engaging in tough-talking nationalistic populism that plays well with many voters and the less lucid Mr Joko sticking to his script as an outsider with the common touch.
The dirty tricks have not been all one-sided. In past weeks, there were rumours Mr Prabowo had suffered a stroke, not just a recurrence of Bell's palsy (which affects the facial muscles) he has suffered from in the past. Neither appears to be true.
Mr Joko's camp has also predictably focused on his opponent's past.
Led by former armed forces chief Wiranto, now head of the People's Conscience Party, a cabal of retired generals raised the issue of Mr Prabowo's role in the abduction of political activists in 1997-98. But they have been constrained by the fact that other senior officers were involved at the time, including some with a lot more blood on their hands than Mr Prabowo, who was then commander of the Indonesian Special Forces.
Mr Wiranto is standing on shaky ground himself, given his longstanding refusal to accept responsibility for the murderous violence that attended East Timor's separation from Indonesia in 1999.
Funding, as usual, has been another significant issue. While Mr Prabowo and running mate Hatta Rajasa appear to have an unlimited war chest, little is known anecdotally about PDI-P's campaign contributions, and how and where the money has been spent.
Mr Joko doesn't play business as usual. When he sought the endorsement of a prominent religious teacher in Jogjakarta a few weeks ago, the word came back that it would cost Rp100 million (S$10,000) for "logistical support". He refused.
Most analysts would agree that a direct presidential election cannot be bought. But one real worry remains: What happens if the margin of victory is so close that it leaves no one satisfied?
That is not an outcome anyone wishes to contemplate, particularly with recent corruption cases casting a pall over the credibility of the Constitutional Court.