An oil pumpjack in Los Angeles, California.

Oil rose by $2 a barrel on Wednesday as a report of lower inventories in the United States and cuts in Russian gas flows to Europe offset concern about weaker demand and a looming U.S. interest rate hike.

Industry group the American Petroleum Institute said on Tuesday crude stocks fell by 4 million barrels, four times the forecast decline. The Energy Information Administration's official figures are out at 1430 GMT.