The Dow Jones industrials crept up 37 points, but the week's loss still was the widest since 2008.
A brutal week for the stock market ended on a quiet note Friday, but worries about the global economy again pounded copper, gold and other commodities.
Fears about Europe's debt increased early Friday on news that Moody's Investors Service had downgraded its ratings of eight Greek banks by two notches. Investors have been waiting in vain for news that Greece will receive the next installment of a bailout package in time to avoid defaulting on its debt next month. If it defaults, banks throughout Europe are likely to lose the money they invested in Greek bonds -- and investors fear that could ultimately lead to a recession in Europe and the U.S.
Finance ministers from 20 large countries pledged Friday to take "all necessary actions to preserve the stability of the banking systems and financial markets." But they offered nothing specific.
Europe's problems helped feed the heavy selling in stocks this week. But the chief worry was that the U.S. is headed for another recession and that the Federal Reserve is running out of ways to fight it.
The Dow Jones industrial average rose 37.65 points Friday, or 0.4 percent, to close at 10,771.48. The Dow lost 6.4 percent for the week, its biggest drop since the week that ended Oct. 10, 2008, when it fell 18 percent. That was at the height of the financial crisis.
The S&P 500 index rose 6.87 points Friday, or 0.6 percent, to 1,136.43. For the week, the index dropped 6.5 percent, its worst slide since the first week of August.
The Nasdaq rose 27.56, or 1.1 percent, to 2,483.23.
Nearly two stocks rose for every one that fell on the New York Stock Exchange Friday. Trading volume was slightly above average at 5.1 billion shares.
John Merrill, chief investment officer at Tanglewood Wealth Management in Houston, said Friday's respite might not last.
"Nothing goes in a straight line, even markets that are declining steeply," he said. Merrill said the market was moderating as traders bought shares that looked like bargains after the week's selling. But the problems that have weighed on markets for months now show no sign of letting up.
Bargain-hunters "bring some stability into the market for a day or two, until they've used up their buying power," Merrill said. "Then the macro issues surface again" and volatility returns.
Commodities from soybeans to metals sank Friday. Gold dropped 5.9 percent, copper lost 6 percent and silver 17.7 percent. Stocks in commodities producers also dropped. Range Resources Corp. fell 11 percent to $58.53. Newmont Mining Corp. fell 3.6 percent to $62.86.
Treasury yields rose slightly from record lows reached Thursday as the quieter stock market reduced traders' hunger for lower-risk bets such as U.S. government debt. The yield on the benchmark 10-year Treasury note rose to 1.80 percent from 1.71 percent late Thursday. Demand for Treasuries drives their prices higher and their yields lower.
Traders had sold gold to raise cash during Thursday's sell-off. They dumped other commodities because they tend to lose value when the economy weakens, such as oil and raw materials.
Because the stock market tends to move on investors' expectations for the next six months, this week's drop signals that investors believe the U.S. economy will keep weakening.
The next two weeks will bring the first look at how the economy did during September. Among them: the Conference Board's consumer confidence index for this month, the Institute for Supply Management's reports on the manufacturing and service industries and the Labor Department's employment report.
The employment report, arguably the most important data for investors, will have the power to calm investors' fears or send stocks plunging again.