Just six months ago, Indonesia's President Joko Widodo seemed to be riding high. After being re-elected with an increased margin of victory last year, he had corralled three-quarters of the Parliament into his ruling coalition and was preparing a wide-ranging new "omnibus law" designed to kick the economy into high gear.
The Covid-19 pandemic has dealt a heavy blow to his ambitious plans. It has strained the under-resourced health system, forced millions of Indonesians out of work and is threatening the worst economic crunch since the Asian financial crisis of 1997-98.
More worryingly, the deepening health and economic crisis has exposed shortcomings in Indonesia's leadership. Jokowi, as he is popularly known, has become increasingly reliant on personal instincts over technical expertise. He seems driven by day-to-day tactics rather than long-term strategy. And his government has shown growing distrust towards civil society.
There are no easy solutions to the Covid-19 crisis but the response from Jokowi's administration has been delayed, disjointed and deficient. The President initially brushed off the risks of the pandemic, saying he did not want to cause "panic". Indonesia has been slow to ramp up testing, and its public messaging has been confusing, caught between the need to promote social distancing and the need to keep the economy moving.
The government has also shown a worrying disregard for science, with Jokowi claiming that there is no evidence that lockdowns work and his ministers variously promoting prayer and a necklace made of eucalyptus as defences against Covid-19.
These factors have contributed to a steadily rising case load and death toll, in what is now one of Asia's worst outbreaks. While other countries are trying to stave off their second wave, Indonesia is still in the midst of its first wave. Around 4,000 people are known to have died already, out of more than 80,000 confirmed cases. The real figures are likely to be several times higher but Indonesia's limited testing capacity means that many Covid-19 cases and deaths go unrecorded.
The deteriorating situation appears to have shaken the President into action in the last few weeks. In recent Cabinet meetings, Jokowi has made a public show of berating his ministers for their poor performance. In typical fashion for a leader who styles himself as a man of action, Jokowi told officials to "work harder and quicker" to tackle the coronavirus outbreak and distribute social assistance. But, given the extent of the crisis, more of the same will not cut it. Jokowi needs to take a different path to help Indonesia through these difficult days and to salvage his second and final term in office.
Every world leader has struggled to find a balance between suppressing the coronavirus and maintaining economic growth. This problem is especially acute in Indonesia, where 80 per cent of the population are financially insecure, often working in the informal sector, and have minimal savings and limited social safety nets.
Some analysts have argued that Indonesia lacks the financial firepower to mount a more comprehensive response to the crisis. Of course, it could not afford the sort of economic bailouts that many developed countries have offered their companies and workers. But there is much more that can be done through better leadership and clearer public communication.
The President needs a new approach to policymaking, driven more by evidence from experts and less by the whims of his motley political coalition.
In the last few weeks, his government wasted time and energy pushing, and then abandoning, a parliamentary Bill designed to promote the national ideology, Pancasila. Critics have said the Bill was a sop to Jokowi's party chief Megawati Sukarnoputri, who heads an agency in charge of promoting Pancasila and whose father Sukarno crafted the concept.
Instead of being distracted by such issues, Jokowi needs to develop a strategic plan for the way forward, supported by a bureaucratic machinery to implement, monitor and enforce it.
There is also a need to rein in the police, who have increasingly gone after the government's critics, and the online "buzzers", as they are known in Indonesia, who launch sustained personal attacks on those who criticise the President's policies on social media. Instead, Jokowi should re-embrace the smart, committed activists who helped him win the presidency and can help drive Indonesia forward again.
As a symbolic marker of this new approach, he should consider putting on hold, or even abandoning, plans to build a costly new capital city in the jungles of Kalimantan. Rather than spending precious funds on this questionable project, he should focus on expanding and improving public healthcare and assistance programmes for vulnerable people. While Jokowi sees the new capital as a symbol of progress, Indonesia would be better served by more concrete measures to boost the economy.
For example, he should pursue the bureaucratic reforms that he has been talking about for years but is yet to deliver. He will need to start by aligning his Cabinet behind his chief goal of promoting foreign investment. Then he will need to develop much better mechanisms to ensure that the ministries work together to support him, rather than seeking to undermine his plans. Without regulatory certainty, Indonesia will struggle to attract the international capital and technology that it sorely needs.
A former furniture factory owner, Jokowi rose to power by pitching himself as a practical leader who would go to the ground and fix problems as they arose. His track record of solid, incremental progress as mayor of Solo and governor of Jakarta earned him the presidency in part because of frustration at the indecisive and ineffectual leadership of his predecessor, Dr Susilo Bambang Yudhoyono.
In interviews for my forthcoming book - Man Of Contradictions: Joko Widodo And The Struggle To Remake Indonesia - Jokowi told me that this hands-on approach could be scaled up to the national level. But running a sprawling, diverse and democratic country of 270 million people is a very different challenge from city government.
In the first few years of his presidency, Jokowi was able to make progress by injecting new energy into government, using his public popularity to pressure the bureaucracy to perform better, and maintaining a tight focus on building infrastructure.
He became the "hard-hat president", travelling around the country and opening new toll roads, power plants and airports. But the economy did not surge ahead as he expected, with gross domestic product growth coasting at around 5 per cent (before the Covid-19 crisis), well short of his 7 per cent target.
The problem, as numerous advisers and officials have said privately, is that Jokowi tends to govern through action and tactics, rather than planning and strategy. Even before Covid-19 hit, it was a struggle to convert his popularity and ostensible parliamentary backing into the transformative change that Indonesia needs if it is to realise his bold goal to build a prosperous nation by 2045.
This Covid-19-induced crisis is not an opportunity for Indonesia to make the leap into the big leagues, as it threatens to devastate the lives and the economic well-being of millions of people. But it should be a wake-up call for the government.
With more than four years left in office, Jokowi still has time. Thanks to his talent for retail politics, he retains the goodwill of many Indonesians and external partners from Singapore to Australia and Japan to the United States.
Having accumulated political capital for the last six years, he needs to start spending it by pursuing tough bureaucratic and economic reforms that some in his coalition will resist.
Only then will he be able to build on the progress of his first term and turn his ambitious vision for Indonesia into an achievable goal rather than a distant dream.
• Ben Bland is director of the South-east Asia Programme at the Lowy Institute and author of the forthcoming book Man Of Contradictions: Joko Widodo And The Struggle To Remake Indonesia.