Stocks closed higher as a rebound in oil prices boosted energy shares and offset worries about the fate of the auto industry bailout.
Stocks had been up most of the day but then turned lower in mid-afternoon on reports that the auto industry bailout faced strong opposition from Republicans.
The market recovered in the final hour, however, with the Nasdaq and S&P 500 gaining over one percent.
Doubts about the auto bailout pushed General Motors lower, though Ford gained.
"There's a lack of unity as to whether something will or will not happen on the auto bailout, and that's partly why the market lost some ground too," Michael James, senior trader at regional investment bank Wedbush Morgan in Los Angeles, told Reuters.
"The market's concerned with its own internals," Art Cashin, director of floor operations at UBS, said on CNBC. "The bulls are fighting a defensive battle down here at the low end of yesterday's trading range."
Banks and auto makers were the big losers as the market headed south, and consumer stocks weakened as well.
Suntrust Bank and Wells Fargo led the banks lower.
Commodity stocks led gainers, with Anglogold Ashanti surging on a boost in gold prices that sent the metal to $800.
Bank moved mostly lower as well, but major energy producers recouped losses after oil prices briefly turned flat.
On the major indexes, Alcoa led Dow gainers while Amylin Pharmaceutical pushed the Nasdaq tech gauge.
Consol Energy led a slew of companies in the energy industry higher on the S&P 500, though the trade lost some of its luster following a report showing crude supplies higher than anticipated. Oil was nearly $4 a barrel higher by mid-day but backed off later and was up nearly $1.30, above $46, with a half-hour left of floor trading.
American Express was a huge loser on the Dow as credit card companies continued to struggle.
There was still a bounty of bad news to temper enthusiasm, but the broader market movements ignored the signs of gloom.
Video-game maker Electronic Arts was the latest company to slash its earnings outlook, joining FedEx and Texas Instruments in resetting its targets lower.
Eastman Kodak shares also were getting pummeled after the company pulled its forecast and said it will try cutting costs by eliminating management salary increases next year.
And Nortel Networks , whose stock has lost almost all 94 percent of its value since September, is exploring bankruptcy, according to a report in the Wall Street Journal.
"I guess a lot of people feel all the bad news is built in," Dave Rovelli, managing director of US equities for Canaccord Adams, said on CNBC. "It's nice to see these stocks rally on bad news."
Market internals were positive, with gainers beating losers about 1.7 to 1 on the New York Stock Exchange, where volume was an anemic 900 million shares with an hour to go in trading.