Indonesia’s exports bill surged to a fresh all-time high in August, driven by robust demand for the nation’s coal, minerals and other agricultural commodities.

Exports brought in $27.9 billion last month, its highest on record based on Bloomberg data. That made for a 30.2% annual increase, beating economist estimates for growth of 20%.

Imports rose 32.8% in line with forecasts to $22.2 billion, also a record-high. The August trade balance came in at $5.76 billion -- well above the median estimate of $4 billion -- extending Indonesia’s streak to 28 months of consecutive surpluses.

The rupiah extended its gain after the data to trade 0.2% stronger at 14,883 to the dollar on Thursday.

The latest figures should provide a reprieve for Southeast Asia’s largest economy, which was bracing for a winding down of the global commodity boom. The nation earned $4.4 billion from coal last month, with global prices still 110% higher year-on-year. Palm oil exports stood at $3.7 billion last month as prices fell by 10%.

Indonesia’s downstreaming push is also yielding gains. According to Setianto, deputy for distribution and services at the Indonesia statistics agency, exports of nickel and its derivative products have increased significantly since 2020 when the government banned the shipment of nickel ores.