Updated from 11:49 a.m. EDT

Oil prices skyrocketed Thursday in a flurry of panic-driven trading as reports of Israeli rocket attacks and a terrorist assault on a U.S. Navy ship escalated fears that the Middle East violence may soon spill over into oil-producing nations.

The benchmark contract for November delivery of crude oil soared as high as $37 in morning trading on the

New York Mercantile Exchange

, a gain of more than 11% in just a few hours, before settling up $2.81 at $36.06. The morning price rally had stopped just short of the 10-year

high of $37.80 reached last month.

The concerns over crude oil also affected heating oil and gasoline prices. The November contract for heating oil climbed to an intraday high of $1.11, the highest level in at least two decades, before settling up 5.95 cents at $1.077. The November contract for gasoline surged to $1.01 before settling at 99.82 cents, up 7.4 cents.

Oil prices started climbing slowly on Monday but gained momentum as reports of escalating Israeli-Palestinian tensions grew. Adding to supply shortage concerns, industry

data released late Tuesday showed unexpectedly large draws on U.S. oil and gas inventories last week, leaving domestic stocks abnormally low and far below last year's levels.

Department of Energy

figures released on Thursday were decidedly less bullish, showing a buildup of 1 million barrels in crude oil stocks (compared to the

American Petroleum Institute's

report that stocks shrunk by 3.9 million barrels). But the market largely ignored the government's inventory data, focusing instead on reports of escalating violence in the Middle East.

TheStreet Recommends

"The inventory data just added to the confusion," said Thorsten Fischer, an economist at

Economy.com

. "The market is so nervous now that anything that threatens the steady stream of oil coming here is poised to send the markets up."

Oil prices began climbing sharply Thursday morning on news that Israeli helicopter gun-ships

attacked several targets in the Palestinian town of Ramallah in retaliation for the Palestinian mob killing of two Israeli soldiers. In a separate incident, five U.S. sailors were killed in an

attack on a U.S. Navy ship off the coast of Yemen that may have been instigated by Arab terrorists sympathetic to the Palestinians' plight.

"We're not a rational market right now. We're having a panic attack," said Tim Evans, senior energy analyst at

IFR-Pegasus

. "It's the theory that the violence in the Middle East is going to escalate out of control and oil will be $40 a barrel in the blink of an eye. We're building a war premium in effect, when this may well not result in war."

Roger Diwan, managing director at Washington D.C.-based

Petroleum Finance

, said prices should return to the low-$30s once the panic subsides.

"But there's no reason to bring prices down too much now," he warned. "The situation is not stabilized. The question is, when does it stabilize? And what is stabilized?"