NEW YORK — Oil prices jumped almost $3 a barrel Friday, erasing losses from the previous session after a rally in gasoline futures and a drop on Wall Street drew investors back into energy markets.

But prices at the pump fell again, with a gallon of regular gas slipping on average just over a penny to $3.898, according to auto club AAA, Oil Price Information Service and Wright Express. Gas is down 5.2 percent from record high of $4.114 a gallon reached July 17, as high prices eat into demand.

Light, sweet crude rose $2.87, or 2.31 percent, to $126.95 a barrel in late morning trading on the New York Mercantile Exchange after earlier rising to $128.60, its highest level in nine sessions. Prices fell $2.69 Thursday, and are still down 13 percent from the contract's record high above $147 reached last month.

Oil soared apparently after a surprise spike in gasoline futures energized oil markets, said Jim Ritterbusch, president of energy consultancy Ritterbusch and Associates in Galena, Ill. Unexplained jumps in gasoline futures usually suggest that a refinery somewhere is experiencing a slowdown in operations, perhaps from malfunctioning equipment, he said.

"Gasoline seems to leading the energy complex today. It's the strongest thing out there," Ritterbusch said.

Gasoline for September delivery rose 9.5 cents, or 3.09 percent, to $3.1659 a gallon on the Nymex.

Oil was also getting a boost as stocks retreated on news that jobs fell for the seventh straight month and that General Motors Corp. had its third-worst quarterly loss ever.

U.S. government data showed employers cut 51,000 jobs in July against an expected loss of 72,000 — but the July unemployment rate rose to 5.7 percent from 5.5 percent in June, a five-year peak and slightly higher than forecast.

In addition, the Institute for Supply Management said its manufacturing index fell slightly from June's reading, but came in better than economists expected.

July car sales figures will also be released Friday, another guiding point for the markets wanting to know where the American economy is heading.

Crude sold off on Thursday after the Commerce Department said the country's gross domestic product rose just 1.9 percent in the second quarter despite government tax rebates, and the Labor Department said the number of people seeking jobless benefits rose to the highest level in five years.

The disappointing data reaffirmed beliefs that a U.S. economic slowdown will further erode demand for oil products in the world's thirstiest energy consumer. Nymex oil prices have dropped off around $24 a barrel since reaching a record high of $147.27 on July 11.

"Prices will likely correct over the next six months to the $100 to $110 range," said Tetsu Emori, commodity markets fund manager at ASTMAX Futures Co. in Tokyo. "There aren't enough fundamental factors right now pushing prices higher."

Meanwhile, worries about Iran's burgeoning nuclear program also supported oil prices Friday. A deadline expires Saturday for Tehran to show it will stop expanding its uranium enrichment program, at least temporarily, or face the threat of new U.N. sanctions.

Earlier this week, Iranian officials, including supreme leader Ayatollah Ali Khamenei, pledged to continue the country's nuclear program.

In other Nymex trading, heating oil futures rose 6.22 cents to $3.5215 a gallon while natural gas futures added 23 cents to $9.349 per 1,000 cubic feet.

In London, September Brent crude rose $2.03 at $126.01 a barrel on the ICE Futures exchange.

———

Associated Press writers Pablo Gorondi in Budapest, Hungary and Alex Kennedy in Singapore contributed to this report.