Updated from 12:32 p.m. EDT

Crude futures shook off an early drop to end up in the plus column Wednesday sparked by violence in Nigeria.

Light, sweet crude for November delivery rose 73 cents to settle at $59.41 a barrel on the New York Mercantile Exchange. Heating oil rose 2.31 cents to $1.677 a gallon and unleaded gasoline gained 4.11 cents to $1.4978 a gallon. Natural gas futures rose 23.6 cents to settle at $5.995 per million British thermal units.

The Associated Press reported that armed men attacked a convoy in Nigeria's oil-rich southeastern delta. Brig. Gen. Alfred Ilogho said the convoy was carrying supplies for Agip, a subsidiary of Italian oil company ENI SpA, AP reported.

The newswire also said fighting broke out at a pumping station belonging to a Royal Dutch Shell subsidiary elsewhere in the volatile delta region

Earlier in the day, the U.S. Energy Department's weekly supply report said crude inventories increased by 3.3 million barrels to 328.1 million barrels. Gasoline inventories climbed1.2 million barrels to 215.1 million barrel, up 9.6% from last year, and distillate inventories rose 200,000 barrels to 151.5 million barrels, an 18% boost from a year ago.

Traders were looking for another increase in gasoline and distillate stockpiles. Energy analysts polled by Bloomberg expected gasoline and distillates, which include heating oil and jet fuel, to have risen by 1.5 million barrels last week.

In company news, Banc of America, following Lehman Brothers and Merrill Lynch a day before, cut its ratings on several energy stocks. Anadarko ( APC), Talisman Energy ( TLM), Houston Exploration and Noble Energy ( NBL - Get Report) were just a few of the names the firm hit with downgrades. Notably, only Houston Exploration fell in reaction, with the others up between 0.7% to 0.9%.

Valero Energy ( VLO - Get Report) had its own problems, saying after the close of trading that its third-quarter earnings will fall short of analysts' targets because of a sharp drop in gasoline margins. Valero climbed $1.93, or 4%, to $50.10 in regular trading but was recently down $1.24, or 2.9%, to $48.86.