Egypt is inching closer to getting a letter of credit to back a $1 billion much-needed oil supply contract with Libya , but the deal still faces a stumbling block in Tripoli , which fears being dragged into Cairo 's economic woes, officials said.

State-owned Egyptian General Petroleum Corp., known as EGPC, has asked the National Bank of
Egypt for a $1 billion guarantee that will allow it to complete its side of the oil deal with Libya , a bank official said. However, the Libyan government has yet to decide that a letter of credit from that bank is strong enough to overcome the risk of any losses if EGPC is unable to pay for the oil, said a government official.

Failure to agree the deal would be a significant blow for Eqypt because it is seen as vital for easing the country's fuel shortage. An even bigger oil supply deal with
Iraq has faltered due to similar concerns over financial guarantees.

"We have asked EGPC to give us first a guarantee from the finance ministry before we study its request since its loans have exceeded 20% of our capital base, or about 22 billion Egyptian pounds ($3.13 billion)," Mahmoud Montaser, NBE's corporate banking and syndicated loans senior group head told The Wall Street Journal.

"We got the guarantee from the finance ministry and hopefully the letter of credit will be issued soon," Mr. Montaser, who is also a board member of the state bank, said.

Egypt has been facing a diesel shortage since last year, leading to rising food costs, long queues at filling stations and electricity blackouts. Egyptians have also taken to the Internet and streets to protest daily power cuts that they say are getting more frequent and lasting longer.

Neighboring
Libya , a member of the Organization of the Petroleum Exporting Countries, had agreed in March to supply Egypt with up to 1 million barrels a month of crude oil, with a generous credit term of up to a year, which would help Egypt with both its fuel shortage and its cash flow problems.

Egypt has so far been unable to provide a guarantee for the payments to Libya , which is concerned about the political and economic turmoil in the country. Even with a letter of credit from the NBE, Libya is still reluctant to give a stamp of approval.

"The National Bank of
Egypt . It's not a triple A bank," said a Libyan official familiar with the deal. This means that going through with the deal on that basis, "will require...guarantees from the central bank of Libya ," the official said.

The official said the Libyan Foreign Bank--in charge of providing a $1 billion credit line for the country's National Oil Co.--was concerned that exposure to such large risks in the EGPC deal would impede its own financial flexibility, especially when it comes to issuing letters of credit to other commercial partners.

The Egyptian fuel crisis has compounded broader economic problems in the country, which in 2011 overthrew the government of President Hosni Mubarak in a popular uprising.
Egypt 's current government, which is dominated by Islamist party the Muslim Brotherhood, is short of funds and has been negotiating a $4.8 billion loan with the International Monetary Fund, which analysts and investors say is critical for the country. IMF officials left Cairo in April without agreeing on the terms of the loan.

Iraq has also offered 4 million barrels of oil a month to Egypt , with payment deferred for three months with no interest incurred. However, the country's oil minister, Abdul Kareem Luaiby, said last month the deal will be completed only if the North African country provided a letter of credit "opened in internationally recognized banks prior to the supply, but Egypt has so far [been] unable to open such letter of credit."

Egypt 's energy import needs are rising because of a drop in its own hydrocarbon production, stemming from a slowdown in exploration over several years of civil unrest. EGPC has also been paying hefty premiums to import fuel because of the weaker Egyptian pound. It is struggling to pay debts of about $5 billion to foreign energy companies, according to officials familiar with the situation.