NEW YORK — Oil prices regained their stunning upward momentum Wednesday, rising as crude's biggest drivers — a weak dollar and supply concerns — brought buyers back in force.

At the pump, gas prices rose to a new record of over $4.05 a gallon.

Oil futures that were falling a week ago on concerns about declining gasoline consumption have dramatically reversed course and appear poised to set new records above $140 a barrel. While the market remains concerned about the effect of high prices on demand, several weeks of falling oil inventories and the dollar's inability to make headway against the euro have combined to turn market sentiment decidedly bullish.

That's bad news for consumers, already struggling with rising prices for food and consumer goods. Analysts say gas prices could rise to a national average of $4.25 a gallon by the Fourth of July, and are unlikely to fall as long as oil prices keep surging.

On Wednesday, the Energy Department's Energy Information Administration created new supply worries when it said oil inventories fell by 4.6 million barrels last week. Analysts surveyed by energy research firm Platts expected a much smaller decline of about 1.4 million barrels. Any sign that oil supplies are falling has tended to send oil climbing.

Light, sweet crude rose $5.07 to settle at $136.38 a barrel on the New York Mercantile Exchange after earlier trading as high as $138.30. Oil shot up more than $16 over the course of last Thursday and Friday, reaching a trading record of $139.12 before pulling back earlier this week.

The dollar's travails also sent oil prices rising. The euro bought $1.5562 in late afternoon trading, up from $1.5449 Tuesday. Oil prices have closely tracked dollar moves. Last week's sharp price increases came as the dollar fell. Prices then retreated more than $7 earlier this week as the dollar gained ground.

"(Oil's) been hand in hand with what the dollar's been doing," said James Cordier, president of trading firms Liberty Trading Group and OptionSellers.com, based in Tampa, Fla.

Many investors buy commodities such as oil as a hedge against inflation when the dollar falls. Also, a weaker greenback makes oil less expensive to investors dealing in other currencies. Many analysts believe the dollar's protracted decline is the primary reason oil prices have doubled over the past year.

Energy investors are betting that the European Central Bank will raise interest rates later this summer and that the U.S. Federal Reserve will hold rates steady until this fall, Cordier said. If rates rise in Europe but remain unchanged in the United States, the dollar will likely fall further against the euro.

"That's going to really fuel the (investment) funds back into the long side of crude oil," Cordier said.

Other elements of the EIA's report were considered bearish for prices. Supplies of gasoline and distillate fuels such as diesel and heating oil both rose last week, and demand for gasoline fell by 1.3 percent.

But traders chose to focus on the big drop in crude supplies and the weaker dollar, propelling prices higher. Crude inventories have fallen by 23.6 million barrels over the past four weeks.

Retail gas prices, meanwhile, reached another record Wednesday, rising 0.9 cent overnight to a national average of $4.052, according to a survey of stations by AAA and the Oil Price Information Service. The average price for regular unleaded gas in Utah on Wednesday was $3.996 per gallon. Prices continue rising, despite falling demand, because the price of oil keeps moving higher.