The International Monetary Fund on Friday announced it was opening a "precautionary" $6.2 billion line of credit for Morocco to protect the economy from external shocks.
"The Moroccan authorities have stated that they... do not intend to draw on the line, unless Morocco experiences actual balance of payments needs from a deterioration of external conditions," the IMF said in a statement.
Morocco will be able to tap $3.55 billion in the first year, the IMF said.
Known as the Precautionary and Liquidity Line, the financing is the latest version of a credit line launched in 2010 amid the global financial crisis, available for countries with sound economic policies.
"The PLL will allow the authorities to continue with their home-grown reform agenda aimed at achieving rapid and inclusive economic growth, while providing them with a useful insurance against external shocks," the Washington-based institution said.
Morocco has been struggling with drought and the sovereign debt crisis in the eurozone, which is Morocco's biggest trade partner.
IMF managing director Christine Lagarde hailed Morocco's track record of "strong economic policies and wide-ranging structural reforms."
The authorities have taken actions to combat high oil prices which are pressuring the economy and the country's finances, she said.
"Notwithstanding these comprehensive policy measures and favorable macroeconomic prospects, Morocco faces external risks linked to uncertainties in the eurozone and potential oil price increases," she said in the statement.
"The authorities intend to treat the arrangement as precautionary."