The party of popular Jakarta Governor Joko Widodo has claimed victory following Indonesia's hotly-contested presidential election.
No official result has been announced, but a tally announced on TV showed Widodo, also known as Jokowi, won 53.15 percent of the vote.
His rival, former general Prabowo Subianto, won 46.85 percent of the vote.
He says he is withdrawing from the election process, alleging fraud, and has vowed to challenge the result.
Indonesia's election commission is due to announce formal results at 20:00 local time (14:00 GMT).
The chairperson of Widodo's PDI-P party, Megawati Sukarnoputri, claimed victory on behalf of Widodo and his running mate Jusuf Kalla.
Widodo's win represents a break with Indonesia's authoritarian past and old-style politics, which has traditionally been dominated by establishment figures from the political elite and military.
A former furniture-maker who grew up in a small village, Jokowi is seen as a clean politician in touch with the masses. The Jakarta governor has proved to be particularly popular with urban and rural youth.
His rival Subianto is a former general closely associated with the traditional elite. He had the backing of media tycoons.
A former son-in-law of Indonesia's ex-leader Suharto, Subianto has faced multiple questions over alleged human rights abuses.
Jubilant supporters have already taken to Twitter with congratulatory messages for Widodo, using the hashtag #presidenbaru (New President).
Meanwhile about 100 supporters of Subianto held a peaceful protest about 300m from the election commission building in Jakarta, declaring Subianto the real president, the Associated Press reports.
Subianto said earlier on Tuesday that his camp would not resort to violence as it challenges the results.
Security was tight for the announcement, with more than 250,000 police officers on duty across the nation, amid fears that supporters from both camps would clash.
About 130 million votes were cast on July 9 following an intense election campaign.
It was followed by a controversial vote-counting period in which both candidates raised concerns about voting irregularities.
But Widodo's winning margin of 6 percent win is seen as decisive by analysts.
They say that even if Subianto's claim of electoral fraud in certain areas proved to be true, this would be unlikely to change the overall results.
Subianto has three days to file an appeal with Indonesia's constitutional court. The court has till August 22 to make a ruling on the results.