Indonesia bulls sighed in relief when Joko Widodo won a second term as president. Concern that populist Prabowo Subianto, a former general and fiery speech maker, might grab the reins had markets in a whirl.
Even so, investors face another risk: that the next five years will bring more complacency than bold reforms to modernize a rigid economy. They are right to worry. To understand why, it is necessary to explore where Widodo's predecessor went wrong.
Susilo Bambang Yudhoyono did not look the part of economic change agent when he won the presidency in 2004. The former general initially had reformists worried he would do more to coddle the powerful military than fix the cracks that led to Indonesia's collapse seven years earlier.
Weeks after Thailand's July 1997 devaluation, Jakarta stopped defending the rupiah, sending shock waves around the globe. Indonesia, Southeast Asia's biggest economy and home to the world's fourth-largest population, fell like a house of cards. Dictator Suharto lost his 32-year grip on power with bewildering speed, leading to a revolving door of hapless leaders.
With many economists worried Indonesia was destined for failed statehood, Yudhoyono moved to restore order.
He surrounded himself with competent technocrats, strengthened institutions and curbed the military's outsized and often corrupting role in the economy, imposing daylight on the kleptocracy Suharto left behind.
When Suharto was ousted in 1998, Jakarta ranked 133rd on Transparency International's corruption perceptions index, below Pakistan, Iraq and Congo. By 2009 it improved to 111th. Soon after, Jakarta won investment grade ratings for the first time.
Yudhoyono lost interest in the reform game during his second term, turning to more regional pursuits. Also lost was an opportunity to accelerate efforts to raise competitiveness, create better jobs and ensure more inclusive growth.
Might Widodo follow a similar pattern? In his first three years, the former Jakarta governor put some big wins on the scoreboard. He made improving infrastructure a top priority. He irked vested interests by cutting subsidies and increasing transparency at government ministries.
Indonesia's economy is 60% reliant on the "informal sector." As such, moves to put many public services online and shine daylight on procurement and bidding processes were plenty disruptive. Widodo championed a tax-amnesty program to give tycoons fewer incentives to hide wealth and pull capital back home. Thanks to anti-graft policies, Jakarta ranked 89th in Transparency International's latest report, a 44-rung improvement from the Suharto era.
Then Widodo throttled back. Over the past two years, Widodo did more resting on his laurels than heavy lifting. This loss of reformist momentum coincided with rising economic nationalism, a dynamic that has clouded the outlook and worried foreign investors.
Indonesia does not have the luxury of repeating Yudhoyono's error. Right out of the gate, Widodo must devise ways to create new and better-paying jobs, address the high cost of living and rein in deficits. It also means nurturing a new generation of tech unicorns to disrupt an economy more used to heavyweight conglomerates than scrappy upstarts.
Multitasking will be crucial. Even as he ramps ups new battles, Widodo must stay the course on his $350 billion push to improve roads, bridges, ports and power grids. A chronic lack of connectivity between the archipelago's 17,000 islands is a growth killer. In a 2016 report, the Asian Development Bank estimated that logistics costs squander as much as 25% of Indonesia's gross domestic product. That is the highest ratio in Southeast Asia.
That lost GDP could help raise incomes for the 40% of Indonesians that UNICEF says survive on less than $2 a day. Better physical hardware might entice Toyota Motor, Samsung Electronics and Apple to build factories in Indonesia, where 50% of its 260 million people are under 40.
Widodo "is now well aware of the problem that awaits him in the second term -- human resources," says Jusuf Wanandi, co-founder of the Center for Strategic and International Studies. That means more inclusive growth and better training to sharpen Indonesia's economic software.
Last month's opening of the long-delayed Jakarta subway was a big win all around. As Widodo's government said in January, the capital's appalling traffic squanders $6.5 billion annually.
More such wins are crucial to reaching Indonesia's potential. By 2030, for example, Standard Chartered predicts Indonesia will break into the top five economies. By 2050, consultancy PwC sees the economy becoming No. 4 in terms of purchasing power parity, topping Japan and the U.K.
Getting there requires a return to basics. Though growth has averaged 5% annually since 2014, it is well short of the 7% Widodo promised. Well short, too, of what is needed to eradicate poverty. Accelerating GDP will not be easy amid slowing global growth, a U.S.-China trade war and volatile oil prices. This tough global scene makes Jakarta's projection for 5.3% growth this year seem fanciful.
There is indeed fiscal space to stimulate growth, but there is a catch. Jakarta's debt-to-GDP ratio is a tame 29%. The Organization for Economic Cooperation and Development warns, though, that it must find ways to boost tax revenues. If not, a big increase in that ratio might irk credit raters. Bridging the gap means pulling more of the gray economy into the real one.
Big payoffs await accelerated moves to cut red tape. Even though inflation looks contained, rising 2.48% year-on-year in March, pre-election polls show high living costs are a major concern. Households bear the brunt of inefficient transport, cooling and storing networks and bureaucratic customs procedures.
Jakarta's current-account deficit requires immediate attention. It widened to nearly 3% of GDP last year. In response, the rupiah slumped more than 5% in 2018, hitting the lowest levels since 1997. Though the deficit has narrowed a bit this year, analysts polled by Bloomberg still see a $177 million deficit for April.
These cracks collide with rising pressure to turn inward. Prabowo's strident nationalism may have cheered some voters, but it spooked investors. Foreign investment plunged nearly 9% in 2018 as the government tussled with U.S. company Freeport-McMoRan over control of the globe's biggest mine.
Widodo must use his latest mandate from voters to convince investors Indonesia is open for business. One priority is overhauling the so-called negative investment list, which restricts or caps foreign ownership across sectors. That has Indonesia losing out to the Philippines, Thailand and Vietnam.
Jakarta needs that capital to invest in education and training and close the infrastructure gap to avoid the dreaded middle-income trap.
The good news is that Jokowi can point to some success at making Indonesia more business-friendly. By 2017, Jakarta's ranking in the World Bank's Ease of Doing Business report improved to 72nd from 120th in 2014.
Those gains will be squandered if Widodo botches the end game like his predecessor. Investors tend to view Indonesia as a good-news story. Yet nothing would squander that goodwill, and hard-won progress, faster than history repeating itself.
William Pesek is an award-winning Tokyo-based journalist and author of "Japanization: What the World Can Learn from Japan's Lost Decades." He was given the 2018 prize for excellence in opinion writing by the Society of Publishers in Asia for his Nikkei Asian Review work.