NEW YORK — Oil prices fell sharply Thursday as the dollar moved higher and forced crude to lose some of its appeal as a hedge against inflation. Gas prices reached another record at the pump, rising to a national average of $4.06 a gallon, and are likely to keep rising.

Light, sweet crude for July delivery fell $4.38 to $132 a barrel on the New York Mercantile Exchange.

Given the volatile price moves of recent days, oil's decline wasn't seen as a sign of a changing trend. Prices have gone through several sharp swings over the past week, rising more than $16 last Thursday and Friday as the dollar weakened, falling more than $7 earlier this week as the greenback gained, and jumping back more than $5 on Wednesday as supplies and the dollar fell.

Analysts say oil is range trading, waiting for direction from a significant move in the dollar or change in supply and demand fundamentals.

Many analysts believe the market's overall sentiment remains bullish, and the new records are a real possibility in coming days. Oil reached its latest trading record of $139.12 on Friday.

"The price movement of crude has been ... dictated by what we've seen in the greenback," said Edward Meir, an analyst at an analyst at MF Global UK Ltd., in a research note.

On Thursday, the dollar gained ground after the Commerce Department said retail sales rose in May by the biggest amount in six months as 57 million tax rebate checks reached consumers. The 15-nation euro fell to $1.5409 from $1.5571 late Wednesday.

Investors who bought commodities such as oil to protect against inflation when the dollar was falling tend to sell when the greenback gains ground. Also, a stronger dollar makes oil more expensive to investors overseas.

The dollar's protracted decline has been a major factor behind the doubling of oil prices over the past year. Recent statements by Federal Reserve Chairman Ben Bernanke and President Bush emphasizing the importance of strengthening the dollar helped the U.S. currency gain ground. But analysts believe more than words are needed to turn the tide; an actual interest rate increase is needed to send the dollar definitively higher, and oil prices down, said Stephen Schork, an analyst and trader in Villanova, Pa.

At the pump, meanwhile, gas prices rose 0.8 cent overnight to a new record national average of $4.06 a gallon, according to AAA and the Oil Price Information Service. Gas prices are following crude oil's recent surge, and have further to rise before they catch up.

"Gasoline hasn't kept pace with crude oil," Schork said.

Prices could rise as high as $4.25 a gallon in the short term, and would likely rise to $4.50 if oil reaches $150 a barrel, Schork said. If oil rises that high, he said, "there are going to be a lot of people in big market areas paying over $5 a gallon."

"It's going to be a painful summer for American drivers," said Eric Wittenauer, an energy futures analyst at Wachovia Securities in St. Louis.

Rising prices will put even more pressure on consumers already bucking under the effects of skyrocketing fuel and food prices. Diesel fuel, used to transport most food and consumer goods, also reached a new record of $4.794 a gallon Thursday.

In other Nymex trading, July gasoline futures fell 8.58 cents to $3.38 a gallon, and July heating oil futures fell 12.11 cents to $3.8537. July natural gas futures rose 14 cents to $12.80 per 1,000 cubic feet after the Energy Department said inventories rose last week by 80 billion cubic feet, at the low end of analyst estimates.

In London, July Brent crude fell $3.55 to $131.47 on the ICE Futures exchange.