(Bloomberg) -- Pakistan secured a $1.1 billion loan from the International Monetary Fund to avert an imminent default as political turmoil and deadly flooding threaten the South Asian nation’s economy.

The country can withdraw 894 million of the IMF’s special drawing rights, equivalent to about $1.1 billion, the Washington-based lender said in a statement on its website Monday. The IMF also increased the nation’s bailout package to $6.5 billion. 

The funds will be key to stabilizing Pakistan’s economy and debt payment after surging energy costs eroded the nation’s foreign-exchange reserves and stoked Asia’s second-fastest inflation. Pakistan is projected to have secured $38 billion through June 2023, enough to cover the $31 billion it needs, central bank deputy Governor Murtaza Syed told Bloomberg last week. The IMF decision will also pave the way for more aid from Middle East countries.

“Pakistan has averted the default threat,” said Muhammad Rameez, head of equities sales at Foundation Securities Pvt. at Karachi. “It has avoided the fate seen in Sri Lanka.”

Pakistan’s dollar bonds due in December were indicated 0.4 cent higher at 94.44 cents on the dollar on Tuesday, and the benchmark KSE-100 Index rose as much as 1.3%. Meanwhile, bonds due in 2031 were still quoted at below 60 cents on the dollar in distressed territory, as investors remain wary of the longer-term fiscal stability. 

“The immediate priority is to continue the steadfast implementation of the recently approved budget for fiscal 2023, adherence to a market-determined exchange rate, and pursuit of a proactive and prudent monetary policy,” the IMF said.

Pakistan has had a tumultuous track record with the IMF. The government secured a bailout program in 2019 only to have it stall several times due to Islamabad’s failure to meet some loan conditions. Prime Minister Shehbaz Sharif’s government, since taking office in April, has reversed energy subsidies, imposed fresh taxes and unveiled austerity measures to avert what would be the second default in Asia this year after Sri Lanka.

The bailout also comes as Islamabad faces fresh challenges due to precarious political settings and a renewed climate crisis. Former premier Imran Khan is waging a fierce campaign against the government to press for fresh elections, while catastrophic floods over the weekend cost the economy more than $10 billion worth of damage.

(Updates with analyst comment and bond performance in fourth paragraph)

©2022 Bloomberg L.P.