Bargain-hunters helped snap a three-day losing streak on Wall Street in the final hour of trading Friday, reversing a decline that briefly sent the Dow industrials tumbling more than 127 points.

Early on, the trading day looked like a fourth-straight session of selling, with the Dow weighted down by worries that Asia's economic woes are worsening and would lower corporate profits in the United States.

But investors attracted by falling prices and short-sellers - who had sold borrowed stock in a bet that stocks would slide before they had to buy shares to cover their commitment - led the rally.

The Dow, which fell almost 160 points Thursday to cap a three-day slide of 257.83 points, closed with a gain of 23.17 to 8,834.94. While it lost 202.77 points over the bruising week for blue-chip stocks, the Dow still is up 11.7 percent for the year, or by 926.29 points.

With the solid rebound, which left broader indicators mixed, the outlook was brighter for next week.

"If we were down at the end of the day, Monday could have been a lot uglier," said Ronald J. Hill, investment strategist at Brown Brothers Harriman & Co. "But we could be turning. And with bonds at new highs, stocks should probably follow along" on Monday.

U.S. Treasury bonds, a traditional haven for nervous investors in times of economic unrest, have been big winners for much of the week. Yields on 30-year Treasuries, which move in the opposite direction of prices, fell Thursday to 5.65 percent, the lowest level since the government began regular sales of the securities in 1977. Yields dipped even further Friday morning as stocks sank at home and abroad but later nudged higher to finish the day at 5.66 percent.

Stocks began sliding in the morning after Japanese officials acknowledged the first year of economic contraction in two decades, confirming that Asia's leading economy is in a severe recession.

Japan's economic malaise has weakened the yen, which fell to its lowest level in nearly eight years. The strong dollar hurts stocks because it makes U.S. goods more costly on international markets, putting pressure on corporate profits.

Edward Collins, head of stock trading at Daiwa Securities America, said recent company warnings that they won't meet earnings targets for the second quarter and rest of the year "has just made everybody pretty nervous."

Much of the credit for Friday's turnaround was going not to optimists but to short-sellers, analyst Hill said.

"It was a pretty good week for short-sellers," he said.

The short seller makes a profit by selling borrowed stock high and buying shares back after they have fallen. After nearly four days of falling stock prices, that made Friday an attractive time to lock in their gains.

Seventeen of the 30 Dow industrial stocks gained ground, led by Chevron, up 3 5/16 to 813/8, and United Technologies, up 2 1/16 at 47 5/16.

Despite the gain in the Dow, declining issues outnumbered advancers by about 12 to 7 on the New York Stock Exchange, where composite volume came to 753.25 million shares, up from 734.78 million in the previous session.

The Standard & Poor's 500 index was up 4.17 at 1,098.75, and the technology-heavy Nasdaq composite index was down 4.70 at 1,745.05,

The NYSE composite index rose 1.17 to 566.67, and the American Stock Exchange composite index dipped 1.65 to 697.40.

The Russell 2000 index of smaller companies fell 2.79 at 441.55.

Overseas, Tokyo's Nikkei stock average rose 0.1 percent, Frankfurt's DAX index fell 1.5 percent and London's FT-SE 100 was down 1.4 percent.