BP reported second-quarter underlying replacement cost profit of $5.7 billion, with earnings more than doubling from the same period a year earlier. The sharp increase was driven by stronger oil and gas prices as well as improved refining performance.

The company’s results highlight how energy producers have benefited from a firmer commodity market during the quarter. Higher realized prices for crude and natural gas supported upstream income, while stronger refining margins added another lift to overall profitability.

BP’s update also reflects the impact of supply disruption linked to tensions in the Middle East. Market shocks in the region helped tighten supplies and boosted pricing, creating a more favorable backdrop for large integrated oil companies with exposure across production and refining.

The latest earnings show how quickly BP’s financial performance can improve when energy prices rise and refining conditions strengthen at the same time. Investors will likely focus on whether those market conditions remain supportive in the quarters ahead.