U.S. crude closed lower in choppy trade, but still recorded weekly gains, as supply disruptions in Iraq and Nigeria provided supported.

Pipeline outages in Iraq and Nigeria have removed more than 800,000 barrels of crude oil per day from the market for at least the next two weeks. The disruptions should offset recent increases to supply from Iran, analysts said.

Also on Friday, oilfield services firm Baker Hughes reported the total number of rigs drilling for crude in the United States fell by 13 to a total of 400 in the previous week. At this time last year, there were 986 rigs in U.S. fields.

U.S. stock prices hit their highest in nearly two months after an upward revision to the country's economic growth for the fourth quarter. A raft of other U.S. economic data also boosted Wall Street, which has traded in tandem with oil for weeks.

"Equities have been in a rally mode and with the technical picture for oil becoming bullish in the short term, we have a risk-on trade in crude," said Chris Jarvis at Caprock Risk Management, an energy markets consultancy in Frederick, Maryland.

Jeffrey Grossman, dealer at New York's BRG Brokerage, said he expected U.S. crude to trade at over $40 by end of March.

Strong gasoline demand in the United States, and an upward revision to the country's economic growth for the fourth quarter, helped boost expectations of oil consumption.

Most analysts said the oversupplied market would not begin to draw down stocks until early next year, but the disruptions and demand helped give a near-term boost to markets that are grappling with crude production that is exceeding demand by 1 million to 2 million barrels per day (bpd).

Data from the U.S. Energy Information Administration showed gasoline inventories falling last week for the first time since early November, suggesting that consumers could gobble up more of the world's oil products than expected.

"The idea that gasoline demand is actually rising suggests that perhaps the lower prices of crude are actually prompting a greater usage of this product (gasoline)," said Vyanne Lai, oil analyst at National Australia Bank.

Investment bank Jefferies called current prices unsustainable and said production declines across most of the important non-OPEC producers is likely to set the stage for an oil price recovery in the second half of this year.