Indonesia's Joko "Jokowi" Widodo has claimed victory in a closely fought presidential race in what would be a triumph for a new breed of politician that has emerged in the world's third-largest democracy.
But ex-general Prabowo Subianto, the rival candidate who is seen as a representative of the old guard that flourished under decades of autocratic rule, refused to concede. His party said he still had a chance of winning.
After a quick count of about 90 percent of votes, Jakarta governor Jokowi was ahead with about 5 percent of the votes in what would be the narrowest victory in the three times that Indonesia has held direct presidential elections.
"We are thankful that according to the quick count announcements, until now, they show that Jokowi-JK at this moment in the count have won," Jokowi told reporters and jubilant supporters in south Jakarta.
JK refers to his running mate Jufuf Kalla, who was a vice president in the first term of outgoing President Susilo Bambang Yudhoyono.
"It's too early to say that (Jokowi has won). This is still in the quick count stage and several TV stations have different results, so (we are) still optimistic that Prabowo (has won)," the vice chairman of Prabowo's Gerindra party, Fadli Zon, told the Reuters news agency.
The election commission had predicted a high turnout and, of 190 million eligible voters, around 11 percent will be punching the ballot for the first time. Almost a third of the voters are under 30.
The official result of the elections will be announced in two weeks.
Hadi Nurul, who was manning a polling station in central Jakarta's Pasar Manggis neighbourhood, told Al Jazeera that voter enthusiasm and turnout in his district were higher than in the 2009 presidential race.
Jokowi and his wife, who just returned from a pilgrimage to Mecca, voted in a park swarmed by supporters and media in Jakarta's leafy, affluent Menteng neighbourhood.
For once, Jokowi was not wearing one of his many red-and-blue plaid shirts, his trademark on the campaign trail, donning a traditional batik shirt instead.
"This is a good day for the Indonesian nation and the Indonesian people. I'm very confident," local media quoted Jokowi as saying when he and his wife cast their votes.
Prabowo, wearing a white safari shirt and the national black "peci" hat and looking equally confident, said: "We respect the democratic process and, of course, we should conduct a good and correct process and show respect."
With the race too close too call, there have been concerns of violence after results are announced, a worry alluded to by outgoing President Susilo Bambang Yudhoyono when he urged both sides to accept the result.
Additional reporting by Al Jazeera's Sam Bollier in Jakarta.