U.S. stocks ended mixed on Friday with the Dow Jones ending its worst week in almost five years as ongoing credit market woes dragged down the financial sector increasing anxiety over the broader economy.

The Nasdaq, despite being down for the week, rose as investors snatched up the biggest names in technology which have recently been left affected. Meanwhile, the Dow Jones industrial average, which rose in earlier trading, fell more than 60 points. Both ended the week in the red territory, losing more than 4 percent. This was the Dow's worst week, percentage-wise, since March 2003.

The Nasdaq composite gained 0.5 percent after falling into bear market territory earlier this week, which is defined as a drop of 20 percent from last weeks highs. The technology-heavy Nasdaq fared better than the other indexes thanks to Amazon.com Inc., which authorized a $1 billion share buyback program. The online retailer rose $2.59, or 3.7 percent, to $73.50.

Data on Friday showed a higher-than-expected rise in U.S. wholesalers' inventories provided Wall Street with economy's health. An increase can be positive, suggesting that companies are betting on a rise in demand, but it can also serve as a worrisome sign that inventories are building up unintentionally because demand is waning.

The Dow Jones industrial average was down 64.87 points, or 0.53 percent, at 12,182.13. The Standard & Poor's 500 Index shed 5.62 points, or 0.42 percent, at 1,331.29. The Nasdaq Composite Index was the only gainer, rising 11.82 points, or 0.52 percent, at 2,304.85.

The Dow and S&P both lost 4.6 percent on the week while the Nasdaq ended 4.5 percent lower.

Shares of Google Inc, Research in Motion Ltd, and Apple Inc, all fell around a third from their highs last year, helping the Nasdaq to fend off losses while the other main indexes fell.

Google shares rose 2.3 percent to $516.69. RIM stock gained 5.7 percent to $89.83 and Apple stock rose 3.5 percent to $125.48.

In overseas markets, the Japan's Nikkei average plunged 1.44 percent. In Europe, Britain's FTSE 100 rose 1.05 percent, Germany's DAX index gained 0.50 percent, and France's CAC-40 dropped 0.30 percent.