The Tempe, Ariz.-based association said its index of business activity rose to 47.9 from 43.6 in July, much better than the 44.0 analysts had been expecting.

An index above 50 signifies growth in manufacturing; a figure below 50 shows contraction. Analysts labeled the report encouraging and said it points to a recovery that could keep the broader economy out of a recession.

Stocks moved sharply higher amid the news early Tuesday. But a late-session sell-off derailed an earlier 230-point rally.

Blue chips rose minimally, while technology stocks tumbled yet again, this time over losses triggered by doubts about Hewlett-Packard's deal to buy Compaq.

The Dow Jones industrials closed up 47.74 at 9,997.49. It was the index's third straight session to close below 10,000.

The manufacturing survey outweighed a report from the Commerce Department that construction edged down in July, the fifth monthly decline in a row, as spending for home improvements fell sharply. Spending for all building projects slipped by 0.1 percent in July to a seasonally adjusted annual rate of $859.4 billion, the government said.

The dollar rose sharply against European currencies with the release of the survey. In late New York trading, the euro was quoted at 88.62 cents, down from 91.19 cents late Friday. Meanwhile, the dollar was quoted at 119.52 Japanese yen, up from 118.80 yen.

The dollar fell to 9.1500 pesos from 9.2021. The peso rose to 10.9290 cents from 10.8671.

Advancing issues led decliners 8-to-7 on the New York Stock Exchange. Volume came to nearly 1.40 billion shares, ahead of the 1.14 billion Friday.

The Russell 2000 index dropped 1.60 to 466.96.

The price of the 10-year Treasury note fell 1 point, or $10.31 per $1,000 in face value. Its yield, which moves in the opposite direction, rose to 4.96 percent from 4.83 percent late Friday.