NEW YORK — Oil futures rose Wednesday, recovering from early losses as threats against Nigerian oil facilities led investors to set aside concerns about falling U.S. gas demand.

At the pump, meanwhile, gas prices rose to a new record over $3.94 a gallon.

Light, sweet crude for July delivery was up $1.33 at $130.18 a barrel in early afternoon trading on the New York Mercantile Exchange, after spending the morning swinging between gains and losses. At its lows, oil was down nearly $3 a barrel, compounding a $3.34 drop in crude on Tuesday. It passed $135 for the first time last Thursday.

Although prices rebounded Wednesday, investors are still contending with a growing belief that U.S. demand for gas is falling in response to prices that already average more than $4 in 11 states and the District of Columbia. The national average price of a gallon of regular gas rose 0.7 cent overnight to a new record of $3.944, according to AAA and the Oil Price Information Service.

Gas prices are likely to keep rising as long as crude prices don't collapse, analysts said. And that means prices will soon breach the psychologically important $4 level on a national basis.

"I can't see anything to stop it from going there," said Chip Hodge, energy portfolio manager at John Hancock Financial Securities in Boston.

Crude prices received a fresh boost from word that Nigerian rebel group The Movement for the Emancipation of the Niger Delta threatened attacks on oil installations beginning Thursday to mark the one-year anniversary of President Umaru Yar'Adua's inauguration. A weekend attack by the group on an oil facility cut about 130,000 barrels of the nation's oil production, said Addison Armstrong, director of market research at Tradition Energy in Stamford, Conn., in a research note. News of disruptions in Nigeria, a major U.S. supplier, have helped push oil prices higher over the past year.

Oil investors also received mixed signals from the dollar, which rose against the euro, but fell against the Japanese yen and British pound. When the dollar declines, investors tend to buy commodities such as oil as a hedge against inflation. But a stronger dollar makes oil more expensive to investors dealing in other currencies.

Still, revised Energy Department data and a new poll by added to the market's concerns that high prices are cutting American consumers' appetite for gasoline. The Energy Department numbers show demand for gasoline fell 1.1 percent in March from a year ago, according to Olivier Jakob, an analyst with Petromatrix Gmbh in Switzerland; that's a change from preliminary data that suggested demand was roughly flat. The survey of about 1,000 people found that more than half have cut back on their driving due to high fuel prices.

The survey's findings jell with recent data from the Energy Department and Federal Highway Administration showing that American consumers are cutting back on driving, and with an AAA survey released before Memorial Day that found fewer people planned to drive over the long holiday weekend.

Data on Memorial Day weekend demand won't be available until next week.

Diesel also rose to a new record Wednesday, adding a cent to average $4.778 nationally, AAA and the Oil Price Information Service said. High diesel prices are pushing the prices of consumer goods and food higher.

In other Nymex trading, June gasoline futures rose 3.81 cents to $3.4211 a gallon, and June heating oil futures rose 3.58 cents to $3.835 a gallon. June natural gas futures rose 3.8 cents to $11.839 per 1,000 cubic feet.

In London, July Brent crude futures rose $1.58 to $129.89 a barrel on the ICE Futures exchange.