Shell Plc said soaring margins from fuel production may have added more than US$1 billion to the earnings of its refining business last quarter, when gasoline prices broke records in several countries.

The trading update from the London-based energy giant is the first indicator of just how much cash was flowing into the coffers of major oil companies due to the inflationary surge in the price of gasoline, which climbed above US$5 a gallon in the US for the first time. 

While the rising cost of energy is strengthening the oil majors after several tough years, it risks a political backlash. US President Joe Biden has directly called on fuel retailers to cut prices and companies are facing windfall taxes in some countries. 

Shell’s indicative refining margin jumped to US$28.04 a barrel in the second quarter from US$10.23 in the first three months of the year, the company said in a statement on Thursday. That’s expected to have a positive impact of US$800 million to US$1.2 billion on the results of its products division, compared with the prior period.

Shell’s shares advanced as much as 2.5 per cent, and traded up 1.2 per cent at 1,997.2 pence as of 9:36 a.m. in London.

Still, analysts at RBC Europe Ltd. saw the update as “neutral,” citing uncertainty around the “magnitude of working capital outflows.” In May, Shell said that it would be hit by around US$7.4 billion of working capital movements.

Oil prices have jumped 30 per cent this year as the war in Ukraine stokes supply concerns. Having ramped up its long-term price assumptions, Shell now expects to reverse previous writedowns on asset values by US$3.5 billion to US$4.5 billion.

The company took a US$3.9 billion impairment in the first quarter, stemming from its planned exit from ventures in Russia. It will take an additional hit of as much as US$350 million from the loss of LNG volumes from the Russian Sakhalin-2 project, it said on Thursday.

Trading and optimization results from Shell’s sprawling integrated gas unit fell from the previous quarter, when the business benefited from “exceptional” trading opportunities. The renewables and energy solutions division is expected to report adjusted earnings of US$400 million to US$900 million for the second quarter amid an “exceptional market environment,” the statement showed. 

Shell didn’t give an update on the future of its buyback program, having said it completed US$8.5 billion of repurchases in the first half of the year. The company has previously signaled an acceleration in returns, saying that shareholder distributions would be in excess of 30 per cent of operating cash flow.