Bankrupt Sri Lanka will receive a conditional $2.9 billion bailout to repair its battered finances, the International Monetary Fund said Thursday, following a bruising economic crisis that saw the island nation's president chased from the country.

Months of acute food, fuel and medicine shortages, extended blackouts and runaway inflation have plagued the country after it ran out of dollars to finance even the most essential imports.

The country has defaulted on its $51 billion foreign debt and incensed protesters stormed the home of then-president Gotabaya Rajapaksa in July, with the leader subsequently fleeing the island and issuing his resignation from Singapore.

"Sri Lanka has been facing an acute crisis... disproportionately borne by the poor and vulnerable," the IMF said in a statement after nine days of talks in the capital Colombo.

The IMF board will need to ratify Thursday's staff agreement, which is conditional on the government striking a deal with creditors to restructure its borrowings.

But the lender's head of mission, Peter Breuer, said creditors also needed to help Sri Lanka extricate itself from a "deep crisis" and return to servicing its debt.

"It really is in the interest of all creditors to work with Sri Lanka on this front," Breuer told reporters.

"If creditors are not willing to provide these assurances, that would indeed deepen the crisis in Sri Lanka and would undermine its repayment capacity."

China -- the country's biggest bilateral lender, accounting for over 10 percent of borrowings -- has so far not publicly shifted from its offer of issuing more loans instead of taking a cut on outstanding loans.

Breuer could not say when the IMF financing would become available, but stressed that Sri Lanka's needs were "urgent" and must be addressed immediately.

He added that IMF financing alone would not be enough to address Sri Lanka's deep-seated structural economic problems.

"Additional financing from multilateral partners will be needed to close financing gaps," Breuer said.

The IMF's announcement of a $2.9 billion package, spread over four years, is short of the $3-4 billion sought by Sri Lanka.

Financial analyst W.A. Wijewardena, a former central bank deputy governor, said the government would need to implement more painful reforms to secure funding.

"This shows that Sri Lanka should do a lot more to satisfy IMF requirements," he told AFP. "Debt sustainability is the crucial issue."

He said raising the government share of revenue, currently one of the world's lowest, would be a serious challenge given the current state of the economy.

The Central Bank expects a record eight percent GDP contraction this year, slightly below the IMF's own forecast of 8.7 percent.

The IMF said Sri Lanka had agreed to increase revenues, remove subsidies, ensure a flexible exchange rate and rebuild its foreign reserves, which had hit rock bottom.

President Ranil Wickremesinghe, who took office after his predecessor fled, this week announced further tax hikes and sweeping reforms as part of efforts to bring debt under control.

His government had already raised prices on fuel and electricity more than threefold and removed energy subsidies, a key pre-condition for the IMF bailout.

The coronavirus pandemic was a hammer-blow to the island's tourism industry and dried up remittances from Sri Lankans working abroad -- both key foreign exchange earners.

Rajapaksa's government was criticised for introducing unsustainable tax cuts that drove up government debt and exacerbated the crisis.

Inflation hit a fresh monthly record in August, with the country's main benchmark showing price average rises of 64.3 percent, while the rupee has lost more than 45 percent of its value against the greenback this year.

Authorities resisted approaching the IMF for relief until the country's ballooning debt burden forced a default in April.

At the peak of Sri Lanka's petrol shortages, motorists had to wait for days and sometimes weeks to top up, althought strict fuel rationing has since shortened queues.

Public anger against government mismanagement of the crisis reached fever pitch in July, when protesters stormed Rajapaksa's official residence and occupied several other government buildings.

Wickremesinghe has since restored order, with security forces cracking down on demonstrations and arresting protest leaders.