U.S. stocks were little changed on Thursday, with investors divided between hopes of recovery after stronger-than-expected retail sales and worries about the economy before Friday's key jobs report.

Financial and industrial materials stocks were among Thursday's leaders after four straight days of market declines pushed the broad S&P 500 index below 1,000.

In addition to August's higher-than-expected sales results, a survey showed the vast U.S. services sector last month was at its strongest in nearly a year, offsetting worse-than-expected weekly jobless claims data.

Among financials, Bank of America was up 3.38 percent to $16.82, and Citigroup gained 4.2 percent to $4.75. The S&P financial sector index <.GSPF> was up 1.6 percent.

Among materials stocks, Alcoa Inc , a Dow component, gained 3.7 percent to $11.98.

The market saw some buying opportunities after the retails data, which topped everyone's expectation, easing some fears of a heavy correction in the short term, said Tim Ghriskey, chief investment officer at Solaris Asset Management in Bedford Hills, New York.

But investors are definitely cautious, especially before tomorrow's employment data and possible sell-off before the long weekend.

The Dow Jones industrial average <.DJI> was up 4.53 points, or 0.05 percent, at 9,285.20. The Standard & Poor's 500 Index <.SPX> rose 1.74 points, or 0.17 percent, at 996.49. The Nasdaq Composite Index <.IXIC> gained 4.00 points, or 0.20 percent, at 1,971.07.

The Labor Department is due to release its non-farm payrolls figures on Friday morning, which should shed light on the outlook for the economic recovery.

The payrolls report, accompanied by the U.S. unemployment rate for August, will come before a long holiday weekend, with U.S. financial markets closed on Monday for Labor Day.

Among retailers posting higher-than-expected sales in August were Costco Wholesale Corp and Target Corp

Costco's shares, which were upgraded by JPMorgan, climbed 8.6 percent to $55, while Target gained 1.9 percent to $47.13. The S&P retail index <.RLX> rose 1.29 percent.

Gold prices climbed to their highest since late February, with spot gold hitting a peak of $997.20 an ounce and sending mining company shares higher. Newmont Mining Corp rose 4.7 percent to $45.84 and Freeport-McMoRan Copper & Gold Inc advanced 2.5 percent to $64.32.

The PHLX Gold/Silver index <.XAU> gained 5.4 percent.

On the downside, credit-rating agency Moody's Corp and McGraw-Hill Cos , the parent of credit-ratings firm Standard & Poor's, slid after a federal judge ruled the two companies must defend fraud charges in a class-action lawsuit.

McGraw-Hill shares dropped 11 percent to $28.77 while Moody's shed 11.2 percent to $23.18.

In Friday's non-farm payrolls report, economists polled by Reuters forecast a loss of 225,000 jobs for August.

(Reporting by Angela Moon, Editing by Kenneth Barry)