NEW YORK — Exxon Mobil, Chevron, BP, Shell and TotalEnergies collectively posted $48 billion in profits during the second quarter, lifted by elevated fossil fuel prices as U.S.-Iran tensions pushed energy costs higher.

The five supermajors generated nearly $90 billion in cash from April through June, an all-time high for the industry — surpassing levels recorded after Russia's full-scale invasion of Ukraine in early 2022.

Exxon Mobil recorded $14.5 billion in profits for the quarter. Chevron reported $12.1 billion and Shell contributed $9.8 billion.

President Donald Trump criticized Exxon and Chevron for their profits from higher fuel prices and reiterated demands for lower prices at the pump. Environmental campaigners renewed calls for a windfall tax on the industry.

Despite the cash influx, none of the supermajors increased capital spending, dividends or share buybacks. Clark Williams-Derry, an energy finance analyst at IEEFA, said the industry did not "drill baby drill" — a reference to Trump's policy to maximize energy production.

Instead, oil companies stockpiled cash and reduced debt. Combined cash reserves across the five supermajors rose by more than $17 billion during the quarter.

Williams-Derry said the industry's financial strategy depends on "periodic price spikes" to strengthen finances, with crises like those in Ukraine and Iran serving as a financial antidote to prolonged periods of low, stable prices.

BP CEO Meg O'Neill said the company is focused on what it can control during the Middle East conflict, citing efforts to improve reliability across BP's upstream crude-producing assets and its refining operations.

Brent crude averaged $92.55 per barrel in the second quarter, a 45 percent increase from the first quarter's average of $63.68 per barrel.

Within the energy sector, Oil & Gas Refining & Marketing earnings grew 249 percent while Integrated Oil & Gas rose 166 percent.

The S&P 500 rose 0.6 percent to 7,758. The Dow Jones Industrial Average gained 0.3 percent to 54,037 and the Nasdaq climbed 1.3 percent to 26,691.