The UK-based international gas producer depends on Egypt for about a fifth of its production - a source of revenue for its expensive new projects in Brazil and Australia.

But its offshore Egyptian reservoirs are suffering decline, and the country is gearing up to consume more gas at home, increasing the possibility that BG might have to shut part of its two Liquefied Natural Gas (LNG) export operations there.

Meanwhile the ousting of President Mohamed Mursi by the military earlier this month and the fact BG is owed $1.3 billion (£844.2m) by Egypt for domestic gas sales - up from $1.2 billion in the first quarter - have heightened the company’s anxiety about investing in the country.

“Events in Egypt remain a primary concern and will continue to be so as the political, social and business environment evolves,” said BG chief executive Chris Finlayson in a results statement on Friday.

“While our offshore operations continue unaffected, higher than agreed gas volumes were diverted into the Egyptian domestic market during the quarter, impacting volumes available for LNG export,” he said.

The wider civil unrest has made BG reduce its expatriate personnel, including contractors and family members, in Egypt from around 150 to 55, the CEO told analysts. But its projects continue to operate normally, the company said. Future investments in the country remain less certain.

“Given the current situation in Egypt, the Group’s investment programme is under continuous review,” the company said in its statement.

BG’s second quarter net profit dropped to $986 million, beating expectations of $963m and driven by higher than expected production and good profit margins in the new barrels coming onstream in Brazil.

BG shares were up 0.34% at 12.26 GMT having fallen 4.6% over the last 12 months. Santander analyst Jason Kenney said the results showed good underlying delivery and operational momentum.

BG is working to raise flagging production in its Egyptian fields, but in the second quarter, more gas was diverted to Egypt’s domestic market, reaching a maximum pipeline capacity of 900 million cubic feet a day (mmscfd) up from 700 million mmscfd in the first quarter, and resulting in reduced supplies for its LNG export operation.

This means the Egyptian LNG plant is running at lower than planned levels, reducing efficiency and eating into profits.

BG had a deal with the ousted government under which the amount of gas being siphoned off for domestic consumption would not increase before September 2013. In the fourth quarter the government had agreed to contribute to the shortfall in supply via reduced domestic diversions and replacement cargoes.

Five such cargoes of which two are allocated to BG are being provided by Qatar for the period July through September.

Analysts said it was in the new leadership’s interests to maintain stable production.

“Look at Iraq, Libya and Venezuela,” said Oswald Clint of Bernstein. “A government needs the hydrocarbons to flow or it won’t be in power for very long.”