Joko Widodo, Indonesia’s leader, is often compared with Barack Obama. Like the US president, Mr Widodo rose from obscurity to seize the highest office in the land. Like Mr Obama, he is an outsider with little experience of national politics but an agenda for change. Like Mr Obama, expectations are riding so high he is almost bound to disappoint.

The story of how Mr Widodo came to be president of Indonesia, the world’s fourth most populous nation, is as remarkable as that of Mr Obama. Universally known as “Jokowi”, he started out as a member of a self-described “poor family on the riverbank” in central Java. Following in his father’s footsteps, he went into the furniture business, a position from which, in his 40s, he launched his political career by becoming mayor of Solo, a midsized Javanese city. Under his practical, folksy leadership, Solo’s fortunes improved and he gained national attention. In 2012, he became governor of the capital, Jakarta, an arena from which he made an unlikely, but ultimately successful, tilt at the presidency. He assumed office formally last week.

Whether or not Mr Widodo lives up to the hype will be critical for one of Asia’s most important emerging powers. Mr Widodo is the first directly elected president to take the keys of power from a democratically chosen predecessor since the fall of the dictator Suharto in 1998. If he gets it right Indonesia will have gone a long way towards establishing itself as a stable democracy, no mean achievement for the world’s largest Muslim-majority country whose 250m people are strung out over an archipelago of nearly 1,000 inhabited islands.

Get it wrong and Indonesia could slip back into its old authoritarian ways, or, if it cannot create opportunity for millions of aspirational youth, suffer increasing social instability. Success will depend on overcoming two main factors. First, the economy, which has coasted on a now-defunct commodity boom, needs a new lease of life. Second, the small-town mayor now finds himself in the viper’s nest of national politics, with his adopted party controlling only a fifth of parliamentary seats.

Because of its large population, Indonesia is an important economy, bigger than Turkey and only a pinch smaller than South Korea in dollar terms. Its per capita income of $3,500, however, puts it alongside countries such as Guatemala and Swaziland. Mr Widodo takes over at a time when growth has sagged to 5.1 per cent, its slowest in five years. Commodity prices are weak and national finances stretched. The currency came under speculative attack last summer when US tapering was first mentioned. Too dependent on hot money to plug its current account deficit, Indonesia is considered one of the emerging economies most vulnerable to rising US interest rates.

The darkening outlook notwithstanding, Mr Widodo wants to spend money on improving social welfare and woefully neglected infrastructure. Yet the cupboard is bare. Indonesians pay tax amounting to 16 per cent of gross domestic product, one of the lowest rates in the world. Although public debt is low, the government runs a budget deficit approaching the legal limit of 3 per cent of output. To square the fiscal circle, Mr Widodo will have to cut the wasteful energy subsidies that soak up 16 per cent of government spending. He needs to start while his political capital is high.

More fundamentally, Indonesia needs a new growth strategy if it is to create opportunity for the tens of millions who work in low-productivity agriculture and grey-market jobs, including the 40 per cent of the population that manages on less than $2 a day. The answer could lie in manufacturing. Indonesia should capitalise on the fact that wages are rising in China and that labour-intensive manufacturers are seeking new production sites in southeast Asia. Gustav Papanek, emeritus professor at Boston University, calculates that the country could create 21m jobs and nearly double economic growth to 10 per cent if it could grab 7 per cent of China’s market share in manufacturing.

That is probably a stretch, but Jonathan Pincus, president of the public policy Rajawali Foundation, agrees that Mr Widodo could achieve much with only incremental improvements. He suggests creating the fiscal space to spend more on infrastructure, especially outside higher-wage Jakarta; empowering anti-corruption agencies and opening project tendering to online scrutiny; and allowing the rupiah to fall further in order to make exports more competitive and offer some protection against imports.

Mr Widodo has made many of the right noises on policy. However, he could find himself stuck in the political quagmire. Opposition legislators have seized key positions in parliament. They have also championed a law that would roll back local democracy, although Mr Widodo may yet be able to reverse what looks like an attempt by the old political elites to cling on to power.

If Mr Widodo is to avoid the traps being set for him he will have to use all the acumen that took him to the presidency. He will need to be ruthless enough to play the political game, but not lose the support of those who see him as different. In short, he will need to display a mixture of political cunning and idealism that has eluded Mr Obama. If he can pull it off, comparisons with the US president may cease.

Copyright The Financial Times Limited 2018. All rights reserved.