A vendor selling clothes waits for customers at a market in Colombo, Sri Lanka on March 20, 2023.
CNN  — 

Sri Lanka on Monday secured a much-anticipated loan of about $3 billion from the International Monetary Fund (IMF) as the South Asian nation navigates its worst financial crisis in decades.

The deal, nearly a year in the making, will aim to “restore macroeconomic stability and debt sustainability” and “unlock Sri Lanka’s growth potential,” the IMF said in a statement.

The island nation of 22 million was rocked by weeks of unrest last year caused by crippling food, fuel and medicine shortages after its foreign exchange reserves plummeted to record lows, with dollars running out to pay for essential imports. Millions were left unable to feed their families, fuel their vehicles or access basic medicine.

The country’s former president was forced to flee the country after angry protesters stormed his residence and office, demanding his resignation.

In July last year, President Ranil Wickremesinghe said Sri Lanka is “bankrupt,” adding negotiations with the IMF were “difficult.”

Monday’s loan approval will provide much-needed respite for the nation as it faces an uphill climb to revive its flailing economy.

The IMF will immediately disburse an initial $333 million to Sri Lanka, with more funds to follow in the coming months.

In a statement Monday, Wickremesinghe praised the IMF’s decision, saying: “In the 75 years of Sri Lanka’s independence, there has never been a more critical period for our economic future.”

The program will be “imperative to improving Sri Lanka’s standing in and access to international capital markets, and it will demonstrate that Sri Lanka is once again a country attractive to talent, investors