Qatar has rescued Egypt’s $3.7bn Mostorod refinery with an investment totaling around $400m that will enable the project, which has been stalled since the removal of Egyptian ruler Hosni Mubarak in February 2011, to reach financial close in May.

The Gulf state is providing around $300m in equity for the project through Qatar Petroleum (QP), and around a further $100m in the bank debt through Qatar National Bank (QNB). “QP has really bailed out this project through the equity stake,” says one source involved in the deal. Several other changes in the bank group are also understood to have occurred.

After the political changes in Egypt several government entities that were due to invest in the project have had to drop out, leaving the project with a large funding gap to fill. Both QP and QNB are understood to have been in talks to invest in the project for several months. “Relations between Qatar and Egypt have dramatically improved since Mubarak left, and this deal is symbolic of that,” says one banker involved in the deal.

Qatar has already provided hundreds of millions of dollars in direct aid to the Egyptian government since February 2011 to help stabilise the country’s struggling economy. The Mostorod deal is a sign that commercial investment may also follow.

Financing for the Mostorod refinery was virtually a done deal in January 2011, but the Egyptian revolution caused a spate of delays as lenders sought renewed commitments to the project from the provisional government, which also began reevaluating all contracts issued by the old regime.

After being reapproved by the government the project is now going ahead. Bankers on the deal say that political risk insurance provided by the European Investment Bank has also given them comfort to lend in the uncertain political climate of Egypt.

The Mostorod refinery will produce low sulphur content fuels from waste fuel oil already in the country. By producing more domestic fuel the project will allow Cairo to reduce fuel imports, which have been a big drain on its dwindling foreign exchange reserves. “This deal is bullet proof politically,” says a source close to the deal.

“Closing this deal in the current environment is a big vote of confidence and shows that you can still get large scale, complex project finance done in Eygpt,” says Tim Pick, a partner at Shearman & Sterling, who is advising on the deal.