Wall Street losses its nerve as Federal Reserve Chairman Ben Bernanke sounds the fiscal cliff alarm.
But a last-minute rally helped pull the S&P 500 and Nasdaq to a three-day gain.
The economy is already feeling the pinch from the threat of the fiscal cliff.
SOUNDBITE: FEDERAL RESERVE CHAIRMAN BEN BERNANKE (ENGLISH) SAYING:
"The realization of all the automatic tax increases and spending cuts that make up the fiscal cliff, absent offsetting changes, would pose a substantial threat to the recovery. Indeed by the reckoning of the Congressional Budget Office, the CBO, and that of many outside observers a fiscal shock of that size would send the economy toppling back into recession."
Bernanke went on to say the Fed could do little to help if the economy does go over the fiscal cliff, but if Congress acts fast then 2013 could be in his words a "very good year".
Hewlett-Packard is taking an $8.8 billion charge, writing down the 2011 purchase of software firm Autonomy, citing "serious accounting improprieties". The charge set off a war of words with the former head of Autonomy. HP has been plagued by controversies and mis-steps, including a slow response to the shift from PCs to mobile devices. Shares of HP tumbled 12 percent, hitting a 10-year low.
Same-store sales at Best Buy - down nine out of the last 10 quarters and profits were softer than hoped. Shares of the retailer slumped 13 percent to lows also not seen in a decade.
Meanwhile, Federal Prosecutors say a former hedge fund manager is accused of making more than $276 million in ill-gotten gains. Matthew Martoma worked for a unit of SAC Capital, but hedge fund founder Steven A. Cohen was not named in the charges.
In economic news, housing starts jumped in September to the highest in more than four years.
Turning now to Europe, Investors overlooked a downgrade of France debt and focused on hopes of another cash infusion to Greece. Shares ended modestly higher.