JAKARTA, Indonesia (AP) — Indonesia’s economy grew at its slowest pace in four years in 2013 because of a slump in commodity prices and a slowdown in consumer spending.

The Central Statistics Agency said Southeast Asia’s largest economy grew 5.8 percent last year, the first time it has expanded less than 6 percent since 2009.

It said fourth quarter growth was 5.7 percent, slightly above the third quarter’s 5.6 percent but below 6.1 percent growth achieved in the October-December period of 2012.

Indonesia’s growth has been based on high international prices for its abundant natural commodities like coal and palm oil and the spending power of its newly minted middle class.

But consumer demand has waned due to interest rate hikes aimed at reducing inflation and stabilizing the Indonesian currency.

Economic protectionism ahead of elections this year and inconsistent policy making are also deterring investors.

Bank Indonesia, the country’s central bank, will next week hold its monthly meeting to review the benchmark interest rate. It was raised by a cumulative 1.75 percentage points last year to 7.5 percent by November.

In a positive sign for the economy, the statistics agency on Monday said the trade balance in December was a surplus of $1.52 billion. Indonesia typically has trade deficits. For the whole of 2013 it had a trade deficit of $4.06 billion.