LONDON — In a sign that Egypt’s strained relations with the international oil industry may be improving, BP said on Friday that it had reached an agreement to invest with a partner about $12 billion to develop natural gas resources in the country.

The oil company, based in London, said it would develop a large quantity of offshore gas, equivalent to about one-quarter of Egypt’s output, and bring it onshore to be consumed by customers. Gas from the project, called West Nile Delta, is expected to begin flowing in 2017. BP said that additional exploration might lead to a doubling of the amount of gas available.

“The project underlines BP’s commitment to the Egyptian market and is a vote of confidence in Egypt’s investment climate and economic potential,” the company said in the announcement.

The deal is a potential boon for the government of President Abdel Fattah el-Sisi, the former military chief who has been in power since 2013. BP is also taking a very different approach to the Egyptian market than rivals like BG, another British company.

BG and Eni, the Italian oil and gas company, together with Gas Natural Fenosa of Spain, built major liquefied natural gas facilities in Egypt for the export market, but the plants have been largely idled as domestic gas consumption has soared.

BP figures that serving the domestic market for gas, a fuel used by industry and residential customers, makes more sense in a populous, developing country like Egypt than investing in export facilities.

“A transaction of this scale shows that Egypt’s energy policy has turned a corner,” said Catherine Hunter, a London-based gas analyst at IHS, a market research firm.

Since the ouster of Egypt’s longtime president, Hosni Mubarak, in 2011, international oil and gas companies have been increasingly at odds with the government.

The oil companies have been major investors in Egypt, helping it double gas production from 2003 to 2009 and making the country one of the leading producers in Africa, along with Algeria. But output has been declining in recent years, as companies worried about political turmoil said there were insufficient incentives for investment. Domestic consumption of natural gas has quickly caught up with output, almost eliminating exports.

Shortages of natural gas, partly a result of high consumption stoked by low, subsidized prices, have forced Egypt to seek fuel supplies abroad, including from the Israeli offshore developments led by Noble Energy, a company based in Houston. Tight supplies have also led the government to curtail exports of liquefied natural gas, eating into the profit of the likes of BG.

In addition, the government, not known for promptly paying its bills, has fallen into substantial arrears on payments it owes the companies for the oil and gas they produce.

Mr. Sisi, who has the confidence of some parts of the Egyptian business community, has made some strides in energy overhaul, including raising prices. The government, which controls oil and gas sales, has reduced its i.o.u.s to the companies but not eliminated them.

BP estimates that Egypt owes about $3 billion to the industry, with a third of the total owed to BP. The companies said that Egypt was making payments, but Andrew Gould, the chairman of BG, which was owed about $700 million at year’s end, recently told reporters, “We need the balance to go down further.”

Industry executives also said that Mr. Sisi’s increase in prices was needed to encourage investment in exploration and production.

In agreeing to invest a substantial amount of money in Egypt, BP is betting that Mr. Sisi will continue to keep prices at levels where they at least encourage companies to invest in gas production.

BP says it will receive $3 to $4.10 per million B.T.U.s for the gas from its new projects, which it expects to produce five trillion cubic feet of gas. That amount is more than the price of gas in much of the United States, but it is substantially less than Egypt would most likely need to pay for imports of liquefied natural gas.

The economics of the BP project will be helped by using BG’s existing gas pipelines and infrastructure in Egypt to help cut costs. While the new supplies will probably not be enough to enable BG to resume exports of liquefied natural gas, BG will receive payments for the use of its pipelines and processing plants.

BP will hold about 65 percent of West Nile. The rest will be owned by Dea, the German oil company recently acquired by L1 Energy, the investment vehicle of Mikhail M. Fridman, a Russian billionaire, which is headed by John Browne, the former BP chief executive.

L1 Energy acquired Dea on Monday from RWE, a German utility, despite the objections from the British government, which said it was worried that Western sanctions against Russia might be extended to Mr. Fridman. Some of Dea’s output comes from gas fields in British waters.

Continue reading the main story