NEW YORK — Oil prices rose Wednesday, rebounding from earlier losses on reports that Nigerian oil workers are about to strike and as investors focused on a surprise decline in gasoline inventories last week.

Retail gas prices slipped slightly for a second day, a sign that falling demand may be affecting prices and that prices at the pump may have caught up to crude oil's latest record advance.

Oil prices rose sharply in late afternoon trading on reports that talks between white-collar Nigerian oil industry workers and Chevron had broken down. Nigeria is Africa's largest oil producer and a major U.S. supplier.

The news out of Nigeria overshadowed a mixed weekly inventory report from the Energy Department's Energy Information Administration. Gasoline supplies fell 1.2 million barrels last week, where analysts surveyed by energy research firm Platts were expecting an increase of nearly 1 million barrels. However, the EIA also said demand for gasoline is down 1.8 percent, on average, over the last four weeks compared to last year.

Crude oil supplies fell 1.2 million barrels last week, less than the 2 million barrel decline expected by analysts, and inventories of distillates, which include heating oil and diesel fuel, rose 2.6 million barrels — more than expected.

The mixed data caused prices to jump more than a dollar immediately after the EIA report was issued, only to fall by more than $2 later. But prices rebounded on late afternoon reports out of Nigeria, and light, sweet crude rose $2.67 to settle at $136.68 on the New York Mercantile Exchange.

"Obviously, we're worried about supply, so any kind of headline is going to send prices back up," said Phil Flynn, analyst at Alaron Trading Corp. in Chicago.

Also boosting prices, the dollar reversed earlier gains and lost ground against the euro Wednesday afternoon. Investors buy commodities such as oil as a hedge against inflation when the dollar falls. Also, a weaker dollar makes oil less expensive to investors overseas.

In a separate report Wednesday, the American Petroleum Institute, a trade group, said gasoline demand fell 1.4 percent in May, as measured by deliveries, dragging year-to-date demand for gasoline down by 1 percent. That's the first decline in gasoline demand over the first five months of any year since 1991, API said.

Demand for crude oil over the first five months of the year was off 2.5 percent from last year, API said.

In Washington, President Bush renewed his call to open U.S. coastal waters to oil and gas development to boost production and bring prices down. Florida Gov. Charlie Crist dropped his long-standing support for the federal government's moratorium on offshore drilling.

At the pump, the average national price of a gallon of gas slipped 0.3 cent overnight to $4.075 a gallon, according to a survey of stations by AAA and the Oil Price Information Service. It was the second straight decline, bringing prices half a cent below their latest record of $4.08 a gallon, set Monday.

"I think retail prices ... are as close to stasis based on crude prices as they can be," said Tom Kloza, publisher and chief oil analyst at the Oil Price Information Service in Wall, N.J.

With demand for gasoline falling steadily since January, retailers have had a hard time hiking gas prices fast enough to keep up with rising crude prices. While oil prices have risen 94 percent over the past year, and set a new record of $139.89 a barrel early this week, gas prices are up only 36 percent. That discrepancy has put pressure on the profit margins of companies all along the gasoline supply chain, including refiners, distributors and retailers.

Midwest flooding may create a new wrinkle in the gas price equation; corn and ethanol prices are rising as a result of crop damage and transportation bottlenecks. Rising prices for ethanol, which is used as a gasoline additive, could push gas prices still higher, or limit their declines.

"If you're going to be using less ethanol, you're going to be using more oil," Flynn said.

In other Nymex trading, July gasoline futures rose 4.88 cents to settle at $3.4667 a gallon, and July heating oil futures rose 3.78 cents to settle at $3.86 a gallon.

July natural gas futures rose 25.8 cents to settle at $13.21 per 1,000 cubic feet. Natural gas prices last settled over $13 in December 2005, as they were receding from a spike above $15 in the wake of hurricanes Katrina and Rita.

In London, August Brent crude rose $2.72 to settle at $136.44 a barrel on the ICE Futures Exchange.