Stocks fell Friday, erasing an early rally, as worries over the U.S. economy and corporate earnings overcame surprisingly strong reports on retail sales and consumer sentiment.

The blue-chip Dow Jones industrial average closed down 17.92 points, or 0.22 percent, at 8,203.41, and the broad Standard & Poor's 500 fell 3.28 points, or 0.38 percent, to 868.30, according to the latest figures. Both indexes had risen 1.4 percent on the retail data soon after the open.

The Nasdaq Composite Index slipped 6.76 points, or 0.5 percent, to 1,358.85. It had been up as much as 1.6 percent.

For the week, the Dow fell 0.89 percent, the S&P was off 1.2 percent and Nasdaq shed 1.78 percent.

"The uncertainty is getting better, but continues to be a problem," said Edgar Peters, chief investment officer at PanAgora Asset Management Inc, which manages $13 billion. "Just like in Iraq, people here are hopeful but not certain about the future."

The market surged more than 1 percent at the open after retail sales showed American consumers went on a spending spree in March even as sentiment was hitting decade lows. A rebound in confidence in early April suggested consumption should stay strong enough to steer the economy clear of recession.

"I was also encouraged by the retail figures because quite frankly, I was thinking the consumer might slow down," said Subodh Kumar, chief investment strategist at CIBC World Markets in Toronto. But "the focus has shifted toward earnings. The market wants to be cautious ahead of earnings season."

News about corporate America was less than stellar. Boeing Co. (BA) , the world's No. 1 jet maker, fell after warning of $1.2 billion in charges, while Wal-Mart Stores Inc. (WMT), the world's leading retailer, slid on a sour investment call. Boeing fell 2.3 percent; and Wal-Mart was off 2.9 percent.

Next week is one of the busiest of the quarterly earnings reporting season, and many companies have warned that results will fall short of estimates. Investors are struggling to determine how much earnings were hurt by uncertainty over the Iraq war and how much profits will pick up once it ends.

"The reality is the economy is not very strong and we haven't seen consistently strong numbers month over month," said Stephen Carl, principal and head of U.S. equity trading at the Williams Capital Group LP in New York. "We're coming into the corporate earnings season and that has yet to be proven strong as well."

Boeing said it would post $1.2 billion in charges before taxes to reflect the declining value of acquisitions and to add reserves for the second consecutive quarter. Boeing slid 61 cents or 2.25 percent to $26.48.

Wal-Mart led the Dow lower, falling $1.60 or 2.93 percent to $52.98. Investment bank Prudential cut its investment rating on Wal-Mart to "hold" from "buy," saying the stock is trading at 27 times the brokerage's 2003 earnings-per-share estimate.

In related news, BJ's Wholesale Club Inc. (BJ) jumped as much as 9 percent after a report on TheDeal.com Web site said Wal-Mart was looking into buying the warehouse club operator for $1.4 billion. BJ's and Wal-Mart officials did not immediately return calls seeking comment. BJ's added 74 cents or 5.64 percent to $13.85.

General Electric Co. (GE) edged down 2 cents or 0.07 percent to $27.36 after it said first-quarter profits fell nearly 9 percent and it expects second-quarter earnings to fall as much as 15 percent.

Shares of Apple Computer Inc. (AAPL) slid 8.14 percent or $1.17 to $13.20. The company was in talks to buy the world's largest record company, Universal Music Group, a source close to the matter said. The purchase would reinvent Apple, which is suffering from weak computer demand, and a deal would give it new markets for its PCs, software and the iPod digital music player, analysts said.

Drugmaker Andrx Corp. (ADRX) jumped almost 15 percent, on top of a 10 percent rise on Thursday, when U.S. regulators approved its generic version hypertension drug Tiazac. The decision ended a five-year legal fight against the drug's original manufacturer, Biovail Corp.,

Shares of Andrx gained $1.91 to $14.71 on the Nasdaq, where it was one of the top percentage gainers. About 11 million shares had traded hands by mid-afternoon, compared with average daily volume of 2.98 million shares. Andrx said the Tiazac copy would be a "significant contributor" to 2003 results.

Juniper Networks Inc. (JNPR) jumped after posting a profit, offering a lift to other network gear makers -- but not enough to put the tech-rich Nasdaq in positive territory.

Juniper, the No. 2 network equipment maker, gained 68 cents, or 8.09 percent, to $9.09. The company posted a net profit in the first quarter, reversing a loss a year earlier, as revenues rose despite the overall spending slump in the telecommunications industry. Rival Cisco Systems Inc. (CSCO) climbed 13 cents, or 1.3 percent, to $13.17.

Before the open, a government report showed U.S. retail sales rebounded with surprising strength in March. The data helped soothe fears the U.S.-led war against Iraq and rising gasoline prices would keep shoppers from the stores.

The Commerce Department said retail purchases jumped 2.1 percent in the month, well above Wall Street analysts' expectations and the biggest monthly gain since October 2001, when sales were recovering after the Sept. 11 attacks.

U.S. wholesale prices shot up in March amid higher energy costs and a surge in car prices, the government said in a report at odds with expectations of much milder inflation.

The University of Michigan's preliminary April index of consumer sentiment jumped to 83.2 from 77.6 in March, market sources told Reuters. Economists had forecast a rise to 78.1 for the preliminary April survey.

The number of advancing stocks was almost dead even with decliners on the New York Stock Exchange, while on Nasdaq about eight stocks fell for every seven that rose. About 1.12 billion shares changed hands in one of the lightest trading days of the year on the Big Board, and 1.2 billion were traded on Nasdaq.

The Russell 2000 index, the barometer of smaller company stocks, fell 1.39, or 0.4 percent, to 371.30.

Overseas, Japan's Nikkei stock average finished Friday down 2.1 percent. In afternoon trading in Europe, France's CAC-40 rose 1.1 percent, Britain's FTSE 100 inched up 0.1 percent and Germany's DAX index gained 1.4 percent.

Reuters and the Associated Press contributed to this report.