The Elections Commission, known as KPU, said the Jakarta governor had won by just over six percentage points, with 53.15 percent of the nearly 130 million votes cast on July 9.
It was the closest and most bitterly fought election in Indonesia’s history, pitting Jokowi against former general Prabowo Subianto whose promise of strong leadership brought echoes of decades under autocratic rule.
“Joko Widodo and Jusuf Kalla had a vote tally of…53.15 percent of the total national vote,” said KPU chairman Husni Kamil Manik.
“They have been confirmed as the elected president and vice president for the period of 2014-2019.”
In an interview with Reuters before the result was announced, Jokowi promised to simplify life for investors by beefing up the country’s threadbare infrastructure, unravel near impenetrable regulations, and sack ministers if they were not up to the job.
His can-do approach, impatience with bureaucracy and willingness to communicate directly with ordinary people has won him a huge following in a country where close to 40 percent of the population live below or close to the poverty line.
When he moves into the presidential palace in October he will be Indonesia’s seventh president, its third to be elected by direct vote, and its first to be a businessman and not come from the elite.
Tuesday’s vote count nearly came unstuck after his rival accused the KPU of failing to properly investigate allegations of what his team said was widespread cheating.
But, unexpectedly, Prabowo has decided not to challenge the result in the Constitutional Court, his lawyer Mahendradatta said. That could have dragged out the process for several weeks.
A former furniture businessman, Jokowi has had a meteoric rise through Indonesia’s political establishment.
Born into poverty but now governor of Jakarta, he won over voters with a clean image and reputation for competence in local government, in contrast to the autocracy, corruption and power politics that have weighed down the country for decades.
Prabowo’s reputation as a strongman and his vow to reverse the indecisiveness of the outgoing government won him a large following among voters yearning for a return to old-style rule.
The new president, who starts his five-year term on October 20, faces huge challenges to boost Indonesia’s sagging growth, cut a worryingly large current account deficit that is weighing on the currency, and meet pledges to improve the lot of its 240 million people.
Once-surging foreign investment has started to taper off, with companies put off by the lack of infrastructure and what are seen as increasingly nationalist laws.
Poverty among the world’s biggest Muslim population is also worsening and the budget is too tight to allow heavy spending.
One of Jokowi’s first challenges will be to cut into fuel subsidies which distort the economy and eat up about a fifth of the annual budget.
Though the KPU has been widely praised for the way it has conducted the vote, the Prabowo camp has alleged mass cheating in the ballot, enough, they say, to overturn Jokowi’s victory.
Confusion over Prabowo’s position regarding the election count was enough to rattle Jakarta shares, which had been rising on expectations of a win by Jokowi who is seen as more investor friendly.
At one stage the main index was down two percent on worries that the increasingly shrill dispute could spill over into violence. Prices later recovered.
There have been no reports of major unrest since the election. Hundreds of thousands of police and military personnel are on heightened alert across the vast archipelago of 240 million people.
Companies cancelled events and sent their employees home due to fears of potential unrest, and Jakarta’s normally congested roads were quiet during rush hour.
“There are a lot of rumors of instability and unrest, but cautiously I’m confident that it is implausible,” said Tobias Basuki, a political analyst at the CSIS think-tank.