Gasoline prices touched their highest level since March 2022 on Thursday as oil futures surged amid an escalation in Middle East conflict.

The national average at the pump rose above $3.88 per gallon, an increase of $0.25 from a week ago and $0.96 from one month ago, according to AAA data.

At this pace, prices could touch $4 per gallon in the near-term.

"I do believe it's looking like a strong possibility right now," Patrick De Haan, head of petroleum analysis at GasBuddy, told Yahoo Finance. "I think we're 90% of seeing it happen."

Oil prices, which are more than 40% higher than when the Iran war started, coupled with higher-priced summer driving fuel blends, are also putting upward pressure on prices and consumers wallets.

Read more: How oil price shocks ripple through your wallet, from gas to groceries

On Wednesday, President Trump announced a temporary waiver of the Jones Act, which allows non-US ships to deliver goods to other parts of the US.

"This will have a minimal impact on fuel prices, but does help alleviate the supply chain, providing more options to get fuel to US markets," said De Haan.

Diesel prices have also soared roughly 38% from a month ago, surpassing $5 per gallon to reach a four-year high.

The rise in fuel used for trucks and machinery is particularly concerning, given that roughly 70% of goods are transported through trucking in the US.

"There's just lots of ways that oil and derivatives of oil get into the production and transportation of many, many things," said Fed Chair Jerome Powell on Wednesday, suggesting that higher energy prices risk seeping into inflation reads.

The surge in gasoline prices comes as oil rose for a third straight day Thursday after Israel struck and damaged a major natural gas processing facility in southwestern Iran. Tehran retaliated by targeting energy infrastructure across the region.

The latest escalation "is keeping crude in a 'fast market' type of trade," said Dennis Kissler, senior vice president at BOK Financial.

West Texas Intermediate crude oil (CL=F), the US benchmark, rose above $97 per barrel. Futures on international benchmark Brent crude (BZ=F) topped $107.

Traders remain focused on the Strait of Hormuz, a critical oil transit chokepoint where flows have slowed to a near standstill. Strategists warn prices could climb further if the conflict drags on.

RBC Capital Markets estimates oil could surpass the $128 per barrel level reached after Russia’s invasion of Ukraine if the conflict persists for another three to four weeks. If the war stretches on for several months, prices could exceed the 2008 peak of $146 per barrel, analysts said.

Ines Ferre is a senior business reporter for Yahoo Finance. Follow her on X at @ines_ferre.

Click here for in-depth analysis of the latest stock market news and events moving stock prices

Read the latest financial and business news from Yahoo Finance