Oman posted a budget surplus of 656 million rials ($1.71 billion) at the end of the first half of 2023, compared with 784 million rials in the same period in 2022, the state news agency reported on Sunday.

Oman has approved a 2023 budget with a deficit of 1.3 billion rials, or 3% of GDP, after posting a surplus of nearly $3 billion last year.

Gulf oil producers last year benefited from a sharp rise in oil prices, which surged past $100 a barrel after Russia's invasion of Ukraine exacerbated concerns about disruptions to global energy supply.

The budget for this year is based on an average oil price of $55 a barrel. The 2022 budget was based on an oil price assumption of $50 a barrel, but the government later estimated prices averaged $94 a barrel last year.

Oil prices have come off a high of nearly $124 last year, though production cuts by Saudi-led OPEC and its Russia-led allies have helped prices notch their seventh consecutive weekly gain. Brent crude was trading at $86.81 a barrel on Sunday.

Along with Bahrain, Oman is one of the most heavily indebted of the oil- and gas-exporting Gulf countries relative to its size, though it has been paying down some of its debt.

Moody's upgraded Oman's rating to Ba2 in May and maintained a positive outlook, citing stronger fiscal metrics. Also earlier this year, Fitch and S&P both revised their outlooks on Oman's BB rating to positive from stable.

($1 = 0.3840 Omani rials)

(Reporting by Ahmed Elimam; Writing by Yousef Saba; Editing by Andrew Heavens and Hugh Lawson)