Investors looking for good news had the latest encouraging report on the U.S. job market. Weekly unemployment claims declined again, one day before a crucial report on the national jobs picture in December.
The Dow recovered from a 134-point loss to end at 12,415.70. The Standard & Poor's 500 index closed at 1,281.06. The Nasdaq rose 21.50 points to 2,669.86.
Stocks spent the morning lower after Europe - which dominated so much of Wall Street's hectic 2011 - became a concern again.
Trading in UniCredit, a large Italian bank, was halted after the stock lost a quarter of its value. The bank said Wednesday that it would need to offer huge discounts to investors to raise money.
And a financial crisis deepened in Hungary, which had to pay a staggeringly high interest rate of 10 percent on its 12-month debt. That is far above the 7 percent level that forced Greece and Portugal to seek bailouts.
In the United States, Barnes & Noble plunged 17 percent after lowering its profit forecast and saying it might spin off its Nook e-reader, which faces competition from the Amazon Kindle and the Apple iPad.
Other retailers fell, too, after their December sales failed to impress Wall Street.
Upscale stores did well, but others struggled. Macy's beat expectations for sales and rose 1 percent. But Target, J.C. Penney Co., and Gap were all among the worst performers in the S&P 500, each down more than 2.7 percent.
The Labor Department reported another drop in the number of people filing for unemployment benefits, and ADP, which processes payroll data, said private employers added 325,000 jobs last month.
The government reports Friday on how many jobs were created in December and on the unemployment rate, which stands at 8.6 percent.
MetroPCS Communications Inc., the fifth-largest cellphone company in this country, fell 8.9 percent after reporting new subscriber growth that was lower than analysts had expected.
Constellation Brands Inc., which makes Robert Mondavi wine and Svedka vodka, fell 3.5 percent after its quarterly profit dropped 25 percent. North American wine and beer sales were weaker.