(Corrects percentage gain in the lead)

Oil prices rose nearly 5.8 percent on Thursday, fueled by a rally on Wall Street and data showing that the number of workers filing new claims for unemployment benefits fell last week.

U.S. crude rose $2.86 to settle at $52.24 a barrel while London Brent rose $2.47 to $54.06.

The energy complex finished this short week on a strong note, apparently responding to renewed economic optimism in the form of a solid advance in the stock indexes, said Jim Ritterbusch, president of energy consultancy Ritterbusch & Associates in Galena, Illinois.

U.S. stock markets jumped around 3 percent on Thursday after solid earnings from Wells Fargo fed hopes that stability may be returning to the banking sector. <.N>

Markets were also bolstered by U.S. data showing fewer workers than expected filing for jobless aid last week.

Oil has tracked equities markets closely this year as investors sought signs that economic recovery would boost energy demand.

Every time the equity markets move up, the energy complex tags along, said Gene McGillian, analyst at TFS Energy in Stamford, Connecticut. For the energy complex, we will have to see if equities continue to advance next week. That will likely show whether the energy complex is able to hold on to gains made above $50.

Oil prices also climbed on Wednesday on weekly Energy Information Administration data showing a smaller-than-expected build in U.S. crude inventories and a big slump in distillate stocks.

Adding some support, a pipeline blast in Turkmenistan on Thursday fully halted Turkmen gas exports to Russia.

The accident won't have an impact on gas supplies to Gazprom's customers, Russian gas export monopoly Gazprom said in a statement, which did not specify the cause of the explosion but said it had caused a fire.

(Reporting by Gene Ramos, Robert Gibbons and Richard Valdmanis in New York and Joe Brock in London; Editing by Lisa Shumaker)