Egypt liberalized its exchange rate and devalued the currency by almost 50 percent on Thursday to combat its severe economic problems and lay the groundwork for a vital $12 billion loan from the International Monetary Fund.

The move was welcomed on the Egyptian stock market, which promptly soared 8.3 percent on opening, the biggest increase since 2008. The artificially high rate has harmed trade, caused a hard currency shortage and deterred foreign investors.

Liberalizing the exchange rate and cutting subsidies are among the conditions for the IMF loan, which Egypt needs to stabilize an economy suffering severe shortages of hard currency after a decline in tourism and foreign investment.

In the past, Egypt has been heavily supported by the wealthy nations of the Gulf, but with the fall of oil prices and a rise in political tensions between the erstwhile allies, the Arab world’s most populous nation has turned to the international lender of last resort.

[As economy struggles calls for protests in Egypt grow louder]

The currency, which had been officially pegged at nine Egyptian pounds to one U.S. dollar, has been tentatively set at 13 pounds, bringing it closer to the black-market rate, which last week skyrocketed to 18 pounds. An auction to determine the new rate will take place later Thursday.

“While this period will yield some expected volatility in the short term, a liberalized exchange rate regime is the optimal and sustainable path for the Egyptian economy,” said the statement announcing the move by the central bank. “Foreign exchange shortages that hinder economic activity will be eliminated, rendering Egypt more competitive.”

The move has been welcomed by Egyptian businessmen and investors, and if the IMF quickly approves the loan it could spark a much needed economic recovery.

“The success of today’s decision and whether it is going to affect the economy positively or not is also linked to the stability of the market in Egypt,” said Ibrahim El-Ghitany, a senior researcher at the Cairo-based Regional Center for Strategic Studies. “Foreign currency reserves have to rise, and tourism has to flourish again for this decision to be more effective. We have to restore confidence in Egypt’s economy.”

[Hoarding sugar in Egypt? That can get you jailed.]

Egypt’s businesses have been crippled by the shortage of hard currency in a country that imports many consumer items as well as important industry inputs. One of the most obvious signs of the crisis has been a severe shortage of sugar — almost a third of which is imported — which is a major part of the diet. Security forces have conducted raids against suppliers accused of hoarding sugar illegally.

“A lot of products have already built in an inflated price due to a combination of the high black market price and speculation on the part of traders anticipating a further increase in the price of the dollar,” said Timothy Kaldas, an analyst at the Washington-based Tahrir Institute for Middle East Policy.

There have been fears that the country’s deepening economic problems might trigger more social upheaval akin to the uprising that overthrew President Hosni Mubarak in 2011. That movement grew in part over economic reasons.

The country has also suffered from a collapse of the tourism industry over concerns about terrorism, including an Islamic State-linked insurgency in the Sinai Peninsula that claimed the bombing of a Russian passenger plane last year. Tourism was a key source of foreign currency.

When President Abdel Fatah al-Sissi came to power in a 2013 coup, he promised to fix the economy and for a time enjoyed massive popularity. But as the economic crisis has deepened, the leader has faced increasing criticism, even as he urges citizens to further tighten their belts.

The IMF loan will be accompanied by further austerity measures, including the cutting of the generous subsidies that many poorer Egyptians survive on.

Inflation, especially for food items, has risen to its highest levels in years, and the devaluation probably will push it higher — though in some cases the higher black-market rate was already factored into the price of imports.

Nearly a quarter of the country’s 94 million people live in poverty. The official jobless rate is 13 percent, and triple that among young Egyptians.

Schemm reported from Addis Ababa, Ethi­o­pia.

Read more:

Hoarding sugar in Egypt? That can get you jailed.

It used to be a busy resort. Then an airplane fell from the sky

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news