Gas prices have inspired dread among American consumers, who have helplessly watched as prices at the pump precipitously rose higher in recent months. But now gasoline prices are starting to drop, and there is cautious optimism that the trend could continue in the coming weeks.

On Thursday, CNBC reported that future contracts for gasoline have dropped more than 11% in the last week alone. As a result, the price for gas has shown signs of a tepid retreat from prices that nearly topped $5 a gallon nationally.

Since the beginning of Russia’s war in Ukraine on Feb. 24, prices for gasoline have surged to record levels. Nationally, the American Automobile Association (AAA) estimates that the average price for a gallon of gas is $4.752, down from a record $5.02 set last month.

As a result of the earlier surge, runaway gas prices have contributed heavily to worsening U.S. inflation over the last five months. But a trend has been detected of gas prices dropping slowly at stations around the U.S. in July.

Patrick De Haan, head of petroleum analysis at GasBuddy, told CNBC that he has identified nearly 2,535 gas stations nationally where gas prices have fallen below $3.99 in the last week. This number is a drop in the ocean of the over 100,000 gas stations in the U.S., but De Haan predicts the number of stations posting lower prices will double or triple in the next week or so.

“On average, most stations will go down 1-2c/gal every couple days or so, and as long as oil prices don't reverse back, this could continue for 2-3 weeks or more," De Haan wrote on Twitter on Wednesday.

However, the analyst noted that the current market conditions remain volatile. The war continues to add to fears that energy prices can still only go higher while the U.S. energy sector recovers from the damages wrought by the COVID-19 pandemic.

But if this trend continues, it could mean the national average of gas prices could drop to about $4 to $4.25 a gallon by mid-August, according to De Haan.