By Adam Whittaker

Shell's traders continued to benefit from volatility triggered by the conflict in the Middle East in the second quarter, but lost Qatari volumes have dragged on gas output, highlighting the conflict's uneven impact on energy majors.

The British energy major said its gas-trading division is expected to report significantly higher results than the first quarter after benefiting from an uplift in prices, which are typically delayed due to price lag effects in contracts. Shell's oil traders, who delivered bumper profits at the start of the year, are also expected to post a robust performance.

While integrated gas production will fall significantly quarter-on-quarter, Shell did raise its guidance slightly to 610,000 to 650,000 barrels of oil-equivalent a day due to strong production at assets outside of the region. It had previously guided for 580,000 to 640,000 barrels of oil-equivalent a day. The unit produced 909,000 barrels of oil equivalent a day in the first quarter and the fall reflects the impact of the Middle East conflict on Qatari volumes, Shell said.

The conflict between the U.S. and Iran kept oil prices high through most of the second quarter but prices have fallen considerably since the two sides reached a preliminary peace agreement in mid-June.

The war also caused dislocations across energy markets that Shell's vast trading desks have been able to cash in on.

Shell said its oil traders' result is expected to be in line with the prior quarter. While Shell doesn't break out its trading performance, adjusted earnings within its chemicals and products division, which houses its oil traders, surged to $1.925 billion in the first quarter. This compared with a $66 million loss in the fourth quarter of last year.

Despite slow progress in the peace talks, supply across the Strait of Hormuz, through which 20% of the world's crude oil typically flows, is rebounding and analysts have cut their price forecasts for the remainder of the year.

While Shell's traders gained, production in its integrated gas unit suffered due to the fighting.

In May, Shell said it had lost roughly 10% of its total production due to damaged or shut down assets in Qatar, where it owns the massive Pearl gas-to-liquids plant and has a 30% stake in a QatarEnergy LNG facility.

The Pearl GTL was hit by an Iranian attack in March. One facility at the plant--referred to as a train--was damaged and the company is hopeful it can get it back up and running early next year, Chief Executive Wael Sawan told the WSJ Leadership Institute CEO Summit in June. Production at the other train was shut down, with Shell expecting to restart production once the situation in the strait allows.

Second-quarter volumes of liquefied natural gas are expected between 7.4 million and 7.8 million metric tons after the company raised its guidance from 6.8 million to 7.4 million metric tons.

Upstream production--the extraction of crude oil and natural gas--is expected to be 1.75 million to 1.85 million oil-equivalent barrels a day, which is above its previous guided range of 1.62 million to 1.82 million oil-equivalent barrel a day.

The company expects refining margins to rise to around $20 a barrel from $17 a barrel in the first quarter with its refinery utilization rate around 100%.

Shares opened 2.3% higher Tuesday.

Write to Adam Whittaker at adam.whittaker@wsj.com