Oil prices leaped from 12-year lows Thursday, lifted by a swing to optimism on equity markets after steep losses since the beginning of the year.

US benchmark West Texas Intermediate for March jumped $1.18 (4.2 percent) to $29.53 a barrel on the contract's first day of trade on the New York Mercantile Exchange.

Brent North Sea crude for delivery in March, the European benchmark, finished at $29.25 a barrel in London, a gain of $1.37 (4.9 percent) from Wednesday's settlement.

On Wednesday, both contracts had closed at the lowest level in more than 12 years. Analysts say the oil market is looking for a bottom after falling some 70 percent in 18 months.

"Petroleum markets are showing signs of stabilizing after the recent run of weakness, and we see some scope for a technical correction, particularly if global equity markets are able to recover their recently misplaced confidence," said Tim Evans of Citi Futures.

US stocks followed European markets higher Thursday on encouraging hints from the European Central Bank of potential additional stimulus for the flagging eurozone as early as March. The S&P 500 was up 0.8 percent in late trade.

Adding a boost to sentiment was the US government's report of an increase in crude oil inventories that was smaller than expectations.

The Department of Energy said crude inventories jumped by 4.0 million barrels last week, a day after the American Petroleum Institute reported a larger gain of 4.6 million barrels.

"The build was effectively priced in after the API had reported an even larger increase," noted Gain Capital analyst Fawad Razaqzada.

"So, this was not the sort of news the bears were looking for," he said.

Gene McGillian of Tradition Energy said the oversold market was ripe for a bounce higher that would likely be brief.

"Until we have priced in all the concerns about slowing economic growth, especially in China and the emerging countries, or we can see the signs of oversupply about to abate, the market still has room to move on the downside."

The chairman of Saudi Aramco, the world's largest crude producer, said Thursday that OPEC kingpin Saudi Arabia could withstand a prolonged period of low prices.

"If prices continue to be low, we will be able to withstand it for a long, long time," said Khalid al-Falih at the World Economic Forum in Davos, Switzerland.