Saudi Arabia will give Tunisia $500 million as a soft loan and a grant to help it fix its ailing public finances, the Saudi state news agency said on Thursday.

Tunisia is on the edge of a debt crisis and is suffering from shortages of essential goods. Most debt is internal but foreign loan repayments are due later this year and credit ratings agencies have said Tunisia may default.

The Saudi news agency did not provide further details about the loan and grant.

Tunisia is seeking to secure funds from the Gulf states after talks on a $1.9 billion loan have been stalled since October when Tunisia and the IMF reached a preliminary agreement.

(Reporting by Nayera Abdallah; Writing by Tarek Amara Editing by Andrew Cawthorne and Angus MacSwan)