The winner of this week's Indonesian presidential election faces serious challenges to keep Southeast Asia's top economy on track, from cutting fuel subsidies and fighting corruption to revamping creaking infrastructure and boosting spending on the poor.
On top of that he will have to balance a rising tide of economic nationalism that has dimmed the country's appeal as an investment destination with an urgent need to keep foreign funds flowing.
Of the two candidates, Joko Widodo -- who has seen a once-huge poll lead dwindle to just a few points -- is investors' favourite.
The Jakarta governor, known by his nickname Jokowi, is considered clean in a country where corruption is rampant and a potential reformer, although an increasingly nationalistic tone during the election campaign has caused some unease.
In contrast, his rival Prabowo Subianto is looked at warily by markets, as an ex-general with deep roots in the era of dictator Suharto and known for his fiery, anti-foreigner rhetoric.
But whoever wins will find an economy in a delicate state, analysts say.
"The next president will inherit huge problems, he will have to hit the ground running on the first day," economist Latif Adam, from government-funded research group the Indonesian Institute of Sciences, told AFP.
At first glance the economy is looking in good shape, clocking up annual growth of around six percent in recent years on the back of strong commodities exports and growing domestic consumption among a rapidly emerging middle-class.
It also managed to come through last year's emerging markets crisis that was fuelled by fears an end to the US Federal Reserve's stimulus would see foreign cash flood out of the developing economies. Those fears saw Jakarta unveil some much-needed reforms.
However, a global commodities boom has fizzled, growth in gross domestic product at the start of this year was the slowest since 2009 and further reforms seemed to have petered as an expected collapse in investment failed to materialise.
Analysts now warn the government desperately needs a new approach to get the economy back on track.
First on the list, economists say, must be to phase out the huge fuel subsidies that make petrol prices in Indonesia among the cheapest in Asia but gobble up about 20 percent of the state budget.
The government of outgoing President Susilo Bambang Yudhoyono has implemented several limited cuts during a decade in power, but failed to push through radical changes, deterred by popular anger.
"On his first day, the next president will have a very limited fund for ministries and government bodies because the money has been used to increase the fuel subsidy," David Sumual, chief economist of Indonesia's Bank Central Asia, told AFP.
Widodo has pledged to do away with the subsidies entirely, and Prabowo to reduce them substantially.
But large cuts will push up inflation -- and hit the millions of poor people the candidates have pledged to help during their campaigns.
Potholed roads, ageing airports
Increasing investment in infrastructure is also key, in particular to attract foreign investors.
Potholed roads, ageing ports and airports, and rusting train lines that connect the sprawling archipelago of more than 17,000 islands, as well as threadbare public transport systems in cities, are regular complaints of foreign and domestic businesses alike.
The World Bank estimates inadequate infrastructure has knocked about one percent off growth annually in recent years.
Endemic corruption, particularly in government, is also a turn-off for potential investors in a nation that came 114th out of 177 countries and territories in Transparency International's annual graft ranking last year.
A number one ranking means the least corrupt.
"Corruption has cost the economy dearly," Sofjan Wanandi, head of the Indonesian employers' association, told AFP, a