Indonesia's economy grew a faster-than-expected 5.18 percent in the second quarter from a year earlier, thanks to higher commodity prices and stronger consumption.
On Friday, the statistics bureau said Indonesia's gross domestic product expanded 5.18 percent in the second quarter. A Reuters poll forecast 5.00 percent.
The statistics bureau revised annual growth in the first quarter to 4.91 percent from 4.92 percent.
"Global commodity prices improved particularly in the second quarter, compared to the first," Suryamin, the bureau chief said, citing higher crude oil prices in April-June.
Also, he said second quarter agricultural production was good.
Low global commodity prices have hurt Indonesia for years, denting export earnings, investment, state revenue and people's purchasing power.
In 2015, economic growth slowed for the fifth straight year, reaching 4.8 percent, the weakest pace since the global financial crisis.
Household consumption, relatively resilient throughout the slowdown, gained in the second quarter as people spent more money at the start of the Muslim fasting month, which this year began in June.
Government spending rose too, helping lift growth in the second quarter. But investment remained soft, growing slower on a yearly basis in the second quarter compared to the first.
Rate cut ahead?
Rangga Cipta, an economist with Samuel Sekuritas in Jakarta, said growth is now closer to the economy's potential and he expects it to accelerate in coming quarters, helped by at least another 25 basis point cut to Bank Indonesia's benchmark rate.
Capital Economics said Indonesia's struggles are not finished.
"While we think the worst for Indonesia's economy is now over, a combination of fiscal tightening and low commodity prices will keep growth stuck at around 5 percent over the next couple of years," it said.
The central bank this year has cut its benchmark four times totalling 100 basis points. It is adopting a new policy rate this month in a bid to get banks to lower credit rates more quickly.
To fill a widening budget deficit and boost growth, the government is counting on a tax amnesty, offering low rates for taxpayers to come clean with undeclared income.
Bank Indonesia Governor Agus Martowardojo has said money returning home under the amnesty can help the economy expand in 2017 at the higher end of its 5.2-5.6 percent projected range.
Prior to Friday's data, the central bank forecast GDP growth of 5.09 percent this year. The government's target is 5.2 percent.