Indonesia's President Joko Widodo declared victory on Thursday in the race to lead the world's third-largest democracy
He said unofficial results showed his ticket had attracted 54 percent of the popular vote in the poll.
Widodo ran with Islamic cleric Ma'ruf Amin against former military general Prabowo Subianto, who secured 45 percent of votes, according to unofficial "quick counts" of sample votes by private pollsters.
"We must wait for the official result. But 12 pollsters have given clear results... we convey that the Jokowi-Maruf ticket got 54.5 percent of the vote while Prabowo got 45.5 percent," Widodo told a news conference in Jakarta.
Prabowo has also claimed victory, citing internal polls as showing he won 62 percent of the vote.
He claimed that cheating had been widespread across the country during the election.
"We have declared (victory) because we got evidence of widespread cheating at the village, sub-district and district levels across Indonesia," Prabowo told reporters, minutes after Widodo declared victory.
The General Election Commission's website put him at about 45 percent early on Thursday based on results from 808 of more than 800,000 polling stations.