The son of a poor wood seller is set to become president of the world's third-largest democracy. Indonesia's Election Commission on July 22 declared victory for Jokowi Widodo over rival Prabowo Subianto following a nationwide vote on July 9. "This victory is a victory for all the people of Indonesia," the president-elect told his supporters gathered at a port outside Jakarta.

Jokowi, as he is widely known, and his running mate, Jusuf Kalla, won with 53 percent of the vote to Prabowo's 46 percent. Even before the announcement, Prabowo had alleged widespread electoral fraud and vowed to contest the result.

Prabowo has three days to take his challenge to the constitutional court, the only Indonesian body with the authority to order a recount and overturn the results. However, with the final tally revealing a gap of eight million votes between the two candidates a recount is highly unlikely.

Rise to prominence

Jokowi's meteoric rise represents the maturing of this nation of 240 million people as a democracy. As Jokowi himself said, his dream of becoming president would have been unthinkable under the authoritarian leadership of former President Suharto.

Sheer personal determination aside, Jokowi's path to the top was cleared by Indonesia's decentralisation of power after street protests ousted Suharto in 1998. The devolution of power from Jakarta to the provinces forced local officials to become more accountable to the populace. It also boosted local involvement in politics. Equally important was the dissipating of the traditional notion that wahyu, or divine revelation, reverted from Jakarta and Java. Jokowi emerged out of this new political matrix.

His value-driven style of leadership is crafted from the democratic fundamental of serving the people. Jokowi's political morality also derives from Pancasila, Indonesia's official ideals, founded by the country's first President Sukarno. Among Pancasila's five principles is one calling for social justice for all Indonesians.

Jokowi's victory claim disputed in Indonesia

As the wildly popular two-term mayor of Surakarta, Jokowi transformed the city's management by cutting red tape, improving health services and nurturing more responsive public officials. Wearing his trademark simple white shirt, he personally solicited the views of street sweepers and stallholders in how their city should be run. Before he burst onto the scene, Indonesia had never seen the like. This street-style democracy gave Jokowi a solid platform for launching what would turn out to be a stunning rise to prominence.

Jokowi's common man approach has electrified Indonesia, ripping apart business-as-usual politics, where resources go to entrenched elites and other vested interests. A member of a prominent Javanese family and formerly married to Suharto's daughter, Prabowo, hails from this class. He also campaigned under a cloud of accusations of human rights abuses committed when he was a Suharto-era military general.

Prabowo's resounding rejection of the results and the counter-rejection by the Election Commission nevertheless point to a new political landscape. Democracy is still only 16 years old in Indonesia. As it takes root, institutional tools such as election bodies and constitutional courts gain in stature and provide necessary alternative centres of power to reinforce the rule of law and contain political excesses.

The media in all its forms counts as another centre of power.

On July 4, just five days before the election, the influential Jakarta Post publication took the bold step of backing Jokowi - the first time in its 31-year history the newspaper had endorsed a candidate, "There is no such thing as being neutral when the stakes are so high. While endeavouring as best we can to remain objective in our news reporting, our journalism has always stood on the belief of the right moral ground when grave choices must be made," its statement read.

Earlier in the campaign, Hary Tanoesoedibjo, a billionaire tycoon who owns several TV and radio stations and newspapers, pledged support for Prabowo and running mate Hatta Rajasa. This is how a healthy media in vibrant democracies function. For a few weeks every few years, media outlets put aside their usual quest for objective journalism to rally the public to vote for a particular candidate.

Indonesian social media also exploded with politically charged comment. According to the Asia Foundation more than 70 million Indonesians are using the internet and around 90 percent of these are on Facebook. More than 30 million tweet. Data gathered by the Qatar Computing Research Institute, from 21,000 followers in each camp, threw up fascinating alignments. Jokowi followers were more likely to follow US President Barack Obama - Jokowi's rise from obscurity has often drawn comparisons with Obama's political ascent. Prabowo's Twitter fans regularly referred to "Islam", or "Muslim", indicating his more traditional power base and well-publicised religious credentials.

In the last few weeks of the campaign, Jokowi's double-digit lead over Prabowo shrank after smear tactics. PoliticaWave, a company studying Indonesian social media, showed how most of the attacks targeted Jokowi. Online accusations suggesting that Jokowi was an ethnic Chinese and a former Christian inflamed anti-Chinese feeling in predominantly Muslim Indonesia.

Democratic stability

In the hours before the July 22 announcement, tension on the streets was palpable, amid fears of violence between rival supporters. More than 250,000 police officers were on duty across Indonesia and thousands of others surrounded the election commission building. The declaration of results sent a wave of relief around the country and abroad.

101 East - Indonesia's Rock Governor

Adults from the age of twenty and upwards will remember the protests that brought down Suharto in 1998 and the accompanying violence in East Timor that eventually led to the province's independence from Indonesia. While Prabowo's supporters favoured his strongman style, few in the country would agitate for a return to the old days of unrest.

What's good for Indonesia is also good for the Asia-Pacific region. India, the world's largest democracy, carried out successful parliamentary elections in April and May, peacefully placing Narendra Modi in power as prime minister. Indonesians were keen to show their democracy was, at least, as capable.

With Philippines, another example of a democracy kicking off the vestiges of its authoritarian past, Thailand is now the only country in the region gripped by old-fashioned political turmoil, where military rulers have overthrown incumbents.

Stability in Indonesia will allow it to press on with its economic progress. Indonesia's strong economic growth of around five percent will continue, according to the Asian Development Bank. It's the world's 16th-largest economy and the strongest in the Association of Southeast Asian nations, the regional power bloc.

However, Jokowi's clear vote margin also means the pressure is on him and his Indonesian Democratic Party of Struggle (PDI-P) to deliver. He'll need to be organised, focused and hard-headed if he wants to execute his Pancasila vision of social justice for all.

Arresting poverty will be a key challenge. The ugly truth is Indonesia's needs are great. Around 30 million people, out of 240 million, barely survive on $1.25 a day. Inequality is steadily rising, with a new super elite enjoying the fruits of this new growth. Prosperity is not being shared as it should be.

Jokowi will have to tackle fuel subsidies, which eat up a fifth of the annual budget, and undertake tricky reforms to lure in investment. He'll also have to improve the country's appalling infrastructure. He has promised 2000km of roads and 10 new seaports, badly needed to stitch this sprawling archipelago together. It won't be an easy ride.

Moreover, at every step, the messy coalition politics that dominates Indonesia's political theatre could cripple Jokowi's abilities to achieve the transformation Indonesia needs. If Prabowo manages to persuade his seven-party coalition to stick together, before Jokowi takes office in October, this could leave Jokowi leading a minority government. This would undermine the president's abilities to govern and effect reform.

Indonesia's short history of democracy is at a critical juncture. The stakes may have been high in the campaign, but they're even higher now. Indonesia must make sure that Jokowi's victory is indeed a victory for all.

Zarina Banu is a freelance writer, focusing on economics and business-policy in the Asia-Pacific.