Updated from 12:15 p.m. EDT
Oil prices rebounded sharply, closing well above $37 a barrel Thursday, as traders reconsidered a selloff that took crude to a two-month low earlier in the week.
The August futures contract closed up $1.69, or 4.6%, to $38.74 a barrel. Gasoline prices, which rose 5 cents a gallon on Wednesday, climbed another 5.9 cents, or 5%, to close at $1.223 a gallon. Prices closed higher for a second consecutive day.
Traders said the jump reflected technical support.
"You had funds that liquidated early in the week, and I believe they overdid it," said Dan Flynn, an oil broker at Alaron Trading in Chicago. "I don't believe anybody wanted to be short going into the long holiday weekend."
That selloff pushed oil prices to a two-month low this week.
But a key Department of Energy report Wednesday said oil stocks dropped about 500,000 barrels in the week ended June 25, cutting into a cushion that reassured traders. Gasoline inventories remained steady for the week.
Another survey by the American Petroleum Institute was more bearish, showing a drop of 4.2 million barrels in oil stocks and 2.1 million for gasoline.
Security worries in Iraq and Saudi Arabia have left the markets prone to wide price swings over the past three months, but Monday and Tuesday saw price drops after the abrupt transfer of power to a transitional government in Iraq.
Despite attacks on pipelines last month, Iraq is now producing between 1.6 and 1.8 million barrels of oil a day.
The Organization of Petroleum Exporting Countries last month agreed to raise its production by 2 million barrels a day, to a ceiling of 23.5 million barrels a day, in response to continued high global demand.