A Reuters poll had expected a surplus of $4.01 billion in December. The surplus in November was worth $5.16 billion.

Exports from the resource-rich country rose 6.58% on a yearly basis to $23.83 billion, roughly in line with the poll's forecast of a 6.65% increase.

Imports declined 6.61% on a yearly basis, the biggest drop in two years, to $19.94 billion, compared with the poll's prediction for a 7.58% drop.

Southeast Asia's largest economy saw an export boom for most of 2022 fueled by high global commodity prices. But export growth slowed later in the year as prices moderated.

For all of 2022, exports were worth $291.98 billion, a historic high for annual shipments and 26.07% higher than in 2021.

Imports last year were worth $237.52 billion, up 21.07% from the year before.

(Reporting by Stefanno Sulaiman, Gayatri Suroyo, Fransiska Nangoy; Editing by Kanupriya Kapoor)