Updated

Stocks ended in negative territory Friday as investors continued to cash in gains from previous rallies ahead of the release of corporate earnings reports.

The Dow Jones industrial average declined 30.88 points, or 0.33 percent, to end at 9,313.08. The Nasdaq Composite index ended down 25.17 points, or 1.39 percent, at 1,792.07, while the Standard & Poor's 500 index closed lower 6.42 points, or 0.64 percent, at 996.85.

The Nasdaq suffered a weekly loss of 6 percent, its biggest one-week decline in 17 months or since the week that ended April 26, 2002, when the index shed 7.4 percent. Analysts said tech stocks took the biggest fall this week because they had enjoyed the greatest gains in the rally that began in March.

The Dow ended the week down 3.4 percent, its largest weekly loss in six months, or in the week that ended this past March 28, when the blue chips gave back 4.4 percent. For the week, the S&P 500 dropped 3.8 percent, its worst weekly percentage loss in eight months, or since the week ended Jan. 24, when the index fell 4.5 percent.

Traders said that as the end of the third quarter approaches, many money managers were selling stocks to lock in gains from the market's rally over the past six months. So far this year, the blue-chip Dow is up 12 percent, the S&P 500 is up 14 percent and the Nasdaq Composite is up 36 percent.

"We're having a continuation of the consolidation that started five days ago," said Alfred E. Goldman, chief market strategist, A.G. Edwards & Sons Inc. in St. Louis.

"I think we're handling the profit-taking in a very positive fashion," Goldman said. "We're really just getting a moderate correction despite the magnitude of the previous rally."

Investors were also looking at the latest economic data on gross domestic product.  The Commerce Department released data showing GDP grew at a revised 3.3 percent annual rate from April through June, up from a 3.1 percent rate estimated a month ago. The second-quarter expansion was more than double the 1.4 percent rates posted in each of the two preceding quarters and was the strongest since a 4 percent rate of advance in the third quarter last year.

Also on Friday, the University of Michigan's said its final September index of consumer sentiment fell to 87.7, below economists' forecasts of 88.5, from 89.3 in August. A preliminary reading on the survey mid-month came in at 88.2.

Consumer sentiment is still well above the nine-year low of 77.6 it reached in March at the start of the Iraq war and above its average for the last 12 months. But the rise in confidence since the major hostilities ended has fallen flat.

There were no major earnings announcements on Friday.

Motorola Inc. (MOT) topped the New York Stock Exchange's most actively traded list. Its shares fell on news that it will not be able to supply two popular digital camera cell phone models in time to meet expected high demand in this year's U.S. holiday season, one of its biggest customers said on Friday.

The delays follow last week's surprise resignation of Motorola's chairman and chief executive, Christopher Galvin, amid differences with the board. Shares of Motorola, the world's No. 2 cell phone maker, were unchanged at $12.53 at the close of trading Friday.

On the Nasdaq, Human Genome Sciences Inc. (HGSI) fell, a day after the drug development company said its experimental anti-inflammatory drug failed a mid-stage trial in adults with chronic skin ulcers. The company said it will not develop the drug for that use. Human Genome shares fell 89 cents, or 6.3 percent, to $13.20.

Shares of 3M Co. (MMM) rose and ranked among the Dow's top percentage gainers after Banc of America Securities upgraded its rating on the conglomerate to "buy" from "neutral." Shares of 3M, which makes products ranging from sandpaper to Post-it notes to fiber-optic connectors, gained $1.84 to $143.45.

Eastman Kodak Co. (EK) fell 75 cents to $21.40, after the company said Thursday that it was slashing its dividend to focus resources on developing the digital photography market.

Dell Inc. (DELL) rose 15 cents to $34.11 on the Nasdaq after the computer company announced Thursday that it will enter the consumer electronics market.

Declining issues outnumbered advancers 2 to 1 on the New York Stock Exchange, where volume was moderate.

The Russell 2000 index, which tracks smaller company stocks, fell 9.78, or 2.02 percent, to 485.28.

Overseas, Japan's Nikkei stock average finished Friday up 0.1 percent. In afternoon trading in Europe, France's CAC-40 fell 0.4 percent, Britain's FTSE 100 declined 1.1 percent and Germany's DAX index fell 0.1 percent.

Reuters and The Associated Press contributed to this report.