Indonesian President Joko Widodo has won a second five-year term, preliminary election results showed on Wednesday, in a victory for moderation over the nationalistic rhetoric of his rival, Prabowo Subianto.
While official results are not due until next month, a series of so-called "quick counts" by pollsters showed Mr Widodo as much as 11 percentage points ahead.
Vote counts from five independent survey groups showed Mr Widodo with a clear lead over Mr Subianto, a general during the era of the Suharto military dictatorship who warned Indonesia would fall apart without his strongman leadership.
The vote ended at 1:00 pm (0600 GMT) in Sumatra, although some of the 800,000 polling stations across the volcano-dotted nation remained open late due to delays and long queues.
The quick counts have proven reliable indicators in past elections, but Mr Widodo held off declaring victory.
Indonesia, the world's most populous Muslim-majority nation, is an outpost of democracy in a Southeast Asian neighborhood of authoritarian governments and is forecast to be among the world's biggest economies by 2030.
A second term for Mr Widodo, the first Indonesian president from outside the Jakarta elite, could further cement the country's two decades of democratisation.
Addressing jubilant supporters a few hours after polls closed, Mr Widodo said he was aware of his lead and called for the nation to reunite after the divisions of the campaign.
"From the indications of the exit poll and also the quick counts, we can see it all, but we must be patient to wait for the official counting from the Election Commission," he said.
Mr Subianto, who also lost to Mr Widodo in the 2014 presidential election, had not yet conceded defeat. He said his campaign's exit poll and quick count showed that he had won but urged his supporters not to cause chaos.
His campaign team has alleged massive voter list irregularities, but analysts say the claims are absurd and designed to undermine the election.
Almost 350,000 police and soldiers joined 1.6 million paramilitary officers across the country of more than 17,000 islands to protect the vote.
About 192 million people were eligible to cast ballots in national and regional legislative elections were contested by more than 245,000 candidates.