Oil rose nearly 7 percent to top $45 a barrel on Thursday encouraged by U.S. February retail sales data and ahead of a weekend OPEC meeting.

A report showed sales at U.S. retailers eased a smaller than expected 0.1 percent in February after a surprise gain in the month before, a hint spending could be stabilizing.

U.S. light crude rose $2.91 to $45.24 a barrel by 1703 GMT, after falling more than 7 percent on Wednesday. London Brent crude gained $2.45 to $43.85.

All the underpinnings of a decent rally are falling into place, gasoline's fundamentals are strong, retail sales today were better than expected, said Chris Jarvis, senior analyst with Caprock Risk Management.

The retail sales numbers included a 3.4 percent rise in gasoline sales, the biggest rise since 2007, after increasing by 2.8 percent in January, adding to market impetus.

The U.S. stock market rose for a third straight day, helped by the reassuring February retail sales report.

However, economic data still showed some mixed signals. Caution about the labor market kept gains in check as weekly jobless claims data showed a record high number of workers drawing state jobless benefits.

Similarly, mixed signals came from China. The latest figures from China showed industrial output growth slowed to a record low at the start of the year, weighing on global markets.

However, data showing a continued surge in bank lending in China in February fed optimism that economic activity could soon rebound.

Some support also came ahead of the meeting of ministers of the Organization of the Petroleum Exporting Countries (OPEC) in Vienna on Sunday.

The producer group, the source of about a third of global crude oil supply, is widely expected to talk about stricter compliance with its existing output cuts rather than further reductions.

But some members, such as Iraq and Kuwait, have said an additional cut might be necessary.

Saudi Arabia, the biggest and most influential of the 12-member group, is among those that believe it is too soon to agree new output targets, sources have said.

There is lots of repositioning going on ahead of the OPEC meeting. If the market is sold off a lot it might pressure the OPEC to agree on another cut, said Olivier Jakob of Petromatrix.

(Additional reporting by Maryelle Demongeot in Singapore and Ikuko Kao in London; Editing by Keiron Henderson)