Updated from 4:17 p.m. EDT

Stocks rebounded from deep losses Friday to close near break-even and bring all three major stock indices into positive territory for a week that saw panic about the credit market roil the global financial system.

After being down more than 200 points on Friday morning, the Dow Jones Industrial Average closed down just 31.14 points, or 0.2%, to 13,238.54. The S&P 500 eked out a gain of 0.55 points to close at 1,453.64. The Nasdaq Composite shed 11.6 points, or 0.4%, to 2,544.89.

Stocks battled back in a volatile session with heavy trading volume after plunging on Thursday, but not until the Federal Reserve moved in by injecting $38 billion in liquidity into the system to keep rates from rising above its target level.

"The Fed accomplished what it wanted to accomplish today, but we're not out of the woods yet," says Paul Mendelsohn, chief investment strategist with Windham Financial Services. "There are still major jitters in this market and there are serious problems in the credit market that still need to be worked out, so who knows what will happen on Monday."

With more signs of liquidity problems emerging from a variety of financial institutions, investors are essentially running scared and blind in an extended period of trading volatility, since no one knows the real extent of the problems. But while the credit-market worries sent Wall Street reeling Thursday and Friday, a rally in the first three days of the week provided enough gains to keep the averages in the black.