US petroleum giants ExxonMobil and Chevron released blowout profits Friday due to the Middle East war, as executives cautioned that elevated gasoline prices will probably continue to strain consumers.The US oil giants scored huge profit increases, illustrating that the financial benefits from supply disruptions from the US-Iran war easily offset negative effects at both companies.

ExxonMobil's second-quarter profits more than doubled to US$14.5 billion, while Chevron's came in at $12.1 billion, more than five times the level in the year-ago quarter.

But gasoline prices sit above the psychologically important $4 per gallon level, posing political risk to US President Donald Trump ahead of the US midterm elections.

While crude prices are relatively high, executives with the two oil giants emphasized the effects of diminished refinery capacity in the wake of Iran's virtual shutdown of the Strait of Hormuz that has led some plants to shut or reduce runs.

"I wouldn't hold my breath here in the short term," ExxonMobil chief executive Darren Woods told CNBC in response to a question about when gasoline prices will fall.