NEW YORK — Oil futures climbed to a new record near $143 a barrel Friday, as the dollar weakened against the euro, confirming expectations that the falling greenback, a major factor in crude's stratospheric rise, will extend its decline and add to oil's appeal.

Retail gas prices inched lower overnight but are likely to resume their own trek into record territory now that oil futures have broken out of the trading range where they had been for nearly three weeks.

Light, sweet crude for August delivery rose as high as $142.99 a barrel on the New York Mercantile Exchange before pulling back sharply in a spate of late-day profit-taking to settle up 57 cents at a record $140.21. On Thursday, the contract shot past $140 and rose more than $5 to a new settlement record.

The latest record came as the dollar fell against the euro in afternoon trading, having traded roughly unchanged for much of the day.

"The dollar was slightly stronger, and when it gave up its gains, that gave oil the green light," said James Cordier, president of trading firms Liberty Trading Group and OptionSellers.com, both based in Tampa, Fla.

The market now believes the Federal Reserve is unlikely to raise interest rates in the near future; since higher rates tend to strengthen the dollar, traders are anticipating that it will continue to fall, and consequently, that investors will keep turning to commodities including oil as a hedge against inflation.

"Oil's back in favor, especially with people bailing out of the stock market," said Jim Ritterbusch, president of energy consultancy Ritterbusch and Associates in Galena, Ill.

The stock market's recent swoon is also sending investors in search of higher-yielding investments. The Dow has fallen nearly 460 points since Thursday and reached its lowest point since September 2006. The Dow Jones industrial average fell 106.91, or 0.93 percent, to close Friday at 11,346.51.

"When money has nowhere to go, it is parked in commodities, as it is one of the few investment instruments that actually rises the more money you pour into it," said Oliver Jakob, an analyst at Petromatrix Gmbh, in Switzerland in a note.

With oil over $140 a barrel, traders are now expecting to see $145 and even $150, analysts say.

At the pump, meanwhile, gas prices slipped 0.1 cent overnight to a national average of $4.066 a gallon, according to a survey of stations by AAA, the Oil Price Information Service and Wright Express. Gas prices have fallen slightly from their June 16 record of $4.08 a gallon but will likely resume their record-breaking rise if oil futures keep trending higher.

That seems likely. Oil has more than doubled in the past year due to the dollar's decline but also because of rising global demand, particularly in fast-growing economies such as China and India. Supply outages in the Middle East and Nigeria have also contributed, as has falling production in Mexico.