Indonesia's current account swung into deficit for the first time in two years in the second quarter due to falling commodity prices and weak global growth, the central bank said on Tuesday, with expectations that the deficit will be higher next year.

Having posted a $6.5 billion balance of payments surplus in the first quarter, Indonesia showed a $7.4 billion deficit in the April-June quarter.

Bank Indonesia (BI) blamed portfolio outflows related to global market uncertainties for the payments deficit, which was not unexpected for the market, as foreign exchange reserves data had given forewarning of the way flows had turned.

Worsening external balances could further pressure the rupiah currency, which has weakened against the U.S. dollar in recent weeks amid rising U.S. Treasury yields and signs of weakness in China's economy.

The second quarter current account deficit was equivalent to 0.5% of gross domestic product, BI data showed.

Addressing a seminar, BI Governor Perry Warjiyo said Indonesia is now expected to run a current account deficit within a range of 0.5% to 1.3% of GDP in 2024.

For this year, BI has forecast the current account would range between a 0.4% deficit to a 0.4% surplus.

The April-June quarter current account deficit of $1.9 billion came after Southeast Asia's largest economy booked a $3 billion surplus in the first quarter, which was equivalent to 0.9% of GDP.

Before this, the last time Indonesia had recorded a quarterly current account deficit was in the second quarter of 2021.

The resource rich country had been enjoying an export boom in 2021 and 2022 on rising global commodity prices. But shipments this year have slowed as prices of its top products, including coal and palm oil, plunged.

BI said dividend payments and a widening deficit in services trade also contributed to the second-quarter current account gap.

Satria Sambijantoro, an economist with Bahana Securities, said there is risk of a further slide in the rupiah exchange rate, with the balance of payments seen facing more hits from narrowing merchandise trade surplus and capital outflows due to widening interest rate differentials.

"Our non-consensus view here is the next BI rate move would be up, not down. After all, a 25-bps rate hike should not derail Indonesia's growth momentum, but it will give a much-needed anchor for the FX markets," he said.

A Reuters poll showed economists expect BI to keep rates unchanged at a policy meeting later this week and for the rest of the year, and when the central bank does finally move rates, most economists were expecting a cut to shore up economic growth.

The rupiah was largely unchanged after the data, trading a touch weaker than the previous day's closing but still near its weakest levels since March. Meanwhile, yield of the benchmark 10-year bonds rose to 6.725% on Tuesday, the highest since April 5. (Reporting by Gayatri Suroyo and Stefanno Sulaiman; Additional reporting by Fransiska Nangoy; Editing by Jacqueline Wong & Simon Cameron-Moore)