Joko says he has won a second term in office, but Prabowo has not conceded defeat and alleges there was widespread fraud. Prabowo's camp says it will complain to the Constitutional Court if the election commission declares Joko the winner. Prabowo did the same in the 2014 election, but the court confirmed Joko had won.
Putting aside disputes over who will be president, the challenges the country faces still remain. Southeast Asia's most populous country has been enjoying robust growth, but the uneven pace of development has been making some people feel left behind.
Joko's infrastructure push
President Joko has pushed infrastructure as an engine of economic growth in Indonesia. The country's population is scattered across thousands of islands. Slow transportation systems are putting off manufacturers and need to be overhauled.
We visited a village in western Java, where a newly built road cuts through farmland, giving the village easier access to big city markets. Farmers can now sell their produce faster. Sulaeman, a farmer says: "President Joko gave money to the rural areas. Now all of our roads have been improved."
The president says nearly 200,000 kilometers of village roads have been built under his watch. It's part of a focus on infrastructure development that's seen hundreds of billions of dollars invested since he took office.
Left behind by development
Joko has a strong record when it comes to helping the poor. Last year, Indonesia’s poverty rate fell to less than 10% -- the lowest ever. And unemployment dropped to 5.1%. That's a 20-year low. But Joko's policies have come at a cost. Surging public debt and rising commodity prices are making many people feel that they're not getting the benefits of progress.
Suyitno used to be a loyal supporter of the president. He was convinced after Joko visited his neighborhood in Jakarta during the 2014 campaign and promised to improve the situation there.
But two years later, the entire area was bulldozed to make way for a development project. Suyitno was left suddenly homeless, and couldn't afford to keep his street vendor business afloat.
Low-income urban neighborhoods like Suyitno's voted overwhelmingly for Joko in the 2014 election. But during the campaign this time, the same areas were covered in opposition party posters and flags. Suyitno says: "We don't support Joko. He has hurt his own people. He doesn't care about the people."
About 10 million people in Indonesia's cities are estimated to live below the poverty line. Joko's unkept promises have upset many members of the urban poor.
Gugun Muhammad of the Urban Poor Consortium says: "Joko failed to deliver on many of his promises, such as a program to revitalize poor communities. As an organization, we don’t endorse any particular candidate this year, even though in 2014 we supported Joko."
Steering Indonesia forward
Moreover, some infrastructure projects have suffered from delays and other issues, including the Jakarta-Bandung high-speed railway. That project is part of China’s Belt and Road infrastructure initiative. It's been criticized for making Indonesia more reliant on Beijing. Chinese companies often bring in their own workers. That's causing frustration among working-class Indonesians.
Indonesia’s economy is growing at a steady 5 percent, although that's lower than Joko's target. But it will have to deal with a slowing global economy and the impact of international trade disputes.
Whoever ultimately takes the presidency will face the difficult challenge of steering Southeast Asia's largest economy through a sea of uncertainty.