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.