Updated

Oil prices surged Wednesday as the dollar weakened and prospects improved for oil and gas demand in a strengthening global economy.

Benchmark crude for November delivery gained $1.34 to settle at $83.01 a barrel on the New York Mercantile Exchange.

At the pump, gas prices rose to a national average of $2.820 for a gallon of regular, according to a survey by AAA, Wright Express and the Oil Price Information Service. The price was almost 7 cents more than a week ago and 34.2 cents more than a year ago.

A series of events boosted optimism for the economy, from a forecast for stronger global oil demand to improved corporate earnings.

The International Energy Agency raised its forecast for global oil demand this year and next, based on stronger-than-expected economic growth in larger, developed economies. The Paris-based agency expects global demand for crude to reach 86.9 million barrels a day this year, compared with its forecast last month of 86.6 million barrels a day. Oil demand in 2011 was forecast at 88.2 million barrels a day, up from a previous estimate of 87.9 million barrels a day.

Meanwhile, China imported a record 5.67 million barrels of crude a day in September — a 35 percent increase from a year ago and another sign that the country's economy is still growing.

"Even though we've had a pretty good overhang of supply in the world, it looks like things are becoming a little bit more balanced lately," said Tom Bentz, an analyst at BNP Paribas Commodity Futures.

Crude prices have risen for more than a week in large part because the dollar has weakened against other currencies. Since oil and other commodities are priced in dollars, a weaker dollar makes them more attractive to traders who buy with those currencies.

Traders are also watching stock markets for clues about consumer sentiment. The Dow Jones Industrial Average, the S&P 500 and the Nasdaq all rose after JPMorgan Chase, Intel and CSX all beat earnings forecasts, raising hopes the economic recovery would not falter. The Dow closed up over 75 points.

Looking ahead, analysts expect oil markets to remain volatile, as the Energy Department releases new inventory figures on Thursday and oil ministers from the Organization of the Petroleum Exporting Countries meet.

"The plunge in the dollar could throw the market a curve ball," said trader and analyst Stephen Schork, suggesting Thursday's OPEC meeting could at least consider calling for a production cut in response to the weak dollar. Still, some ministers have signaled that they plan to keep production levels unchanged.

Analysts surveyed by Platts, the energy information arm of McGraw-Hill Cos., expect the government to report that already plentiful crude inventories increased by 1.5 million barrels last week, while gasoline reserves shrank by 1.6 million barrels and distillates — which include diesel and heating oil — declined by 1.5 million barrels.

In other Nymex trading in November contracts, heating oil rose 3.82 cents to settle at $2.3072 a gallon, gasoline added 4.22 cents to settle at $2.1661 a gallon and natural gas gained 6.7 cents to settle at $3.696 per 1,000 cubic feet.

In London, Brent crude climbed $1.14 to settle at $84.64 a barrel on the ICE Futures exchange.