LONDON—BP PLC said Monday it has signed a new agreement in Egypt to develop significant gas resources in two deepwater blocks—a badly needed vote of confidence in the U.K. company whose reputation has been damaged by the deepwater oil spill in the Gulf of Mexico.

"BP and the Egyptian General Petroleum Corp. have a long-standing and successful partnership, and the agreement we signed today takes that to a new level in developing these deepwater resources, as well as creating an important source of future growth for BP," said...