Stocks rebounded to close higher Friday after crude oil prices eased off record highs and investors expressed optimism that markets would be picking up.

The blue-chip Dow Jones industrial average gained 69.32 points, or 0.69 percent, to close at 10,110.14. The technology-laced Nasdaq Composite Index closed higher 18.12 points, or 0.99 percent, at 1,839.01, while the broader Standard & Poor's 500 was higher 7.12 points, or 0.65 percent, to end at 1,098.35.

For the week, the Dow rose 2.9 percent, the biggest rise since May 2003, while the S&P advanced 3.15 percent, the largest rise since October 2003. The Nasdaq rose 4.6 percent, the biggest gain since April 2004. The indexes are at their highest levels in two weeks.

Trading was moderate during Friday's session, with 1.2 billion shares changing hands on the New York Stock Exchange, below the 1.4 billion daily average for last year. About 1.3 billion shares were traded on Nasdaq, below the 1.69 billion daily average last year.

Advancers outnumbered decliners by about three to one on both the NYSE and the Nasdaq.

Global oil prices raced to fresh highs at one point on Friday, carrying U.S. crude to $49.40 a barrel before easing to $47.60. Oil prices are being driven by escalating violence in Iraq and unabated demand growth from China and India. Crude prices have set records in 15 of the last 16 sessions.

Petroleum companies reacted favorably to high prices and lifted the Dow. Exxon Mobil Corp. (XOM) rose 16 cents to $45.25. ChevronTexaco (CVX) gained $1.08, or 1.16 percent, to $94.18. They were two of the biggest boosts to the S&P 500. Exxon was also one of the top gainers in the Dow.

"It's definitely encouraging that even though oil is around $47, it is off today. It's still expensive but the retreat is a benefit," said Brian Williamson, vice president, equity trading, The Boston Co. Asset Management.

General Motors Corp. (GM ) weighed on the blue-chip Dow after The Wall Street Journal said some car dealerships are cutting back orders for 2005 models. Shares of GM fell 21 cents to $41.33, making it the biggest burden on the Dow.

Online search engine Google Inc. (GOOG) continued to see strong demand a day after its debut on Nasdaq. Google, which was offered at $85 per share and closed Thursday at $100.34, was up $7.98, or 8 percent, at $108.31.

Google's competitors benefited from investors new enthusiasm with the technology sector. Yahoo! Inc (YHOO). rose 50 cents to $28.61, while Ask Jeeves Inc. (ASKJ) gained $1.70 to $27.74.

Clothing chain Gap Inc. (GPS) said disappointing summer sales and its debt burden kept its earnings lower, though the company managed to beat reduced Wall Street expectations by 3 cents per share. Gap gained 47 cents to $20.62.

High-end department store chain Nordstrom Inc. (JWN) tumbled $3.74 to $36.82 after reporting a 62 percent jump in profits, but the company missed analysts' earnings estimates by 2 cents per share.

Software company Novell Inc. (NOVL) fell 13 cents to $6.26 after returning to profitability in the second quarter, but missed Wall Street expectations on its earnings by a penny per share.

Healthcare provider Aetna Inc. (AEF) agreed to acquire Strategic Resource Co. (search), a privately held health benefit administrator, for $250 million. Aetna rose $1.78 to $94.23.

The Russell 2000 index of smaller companies was up 10.48, or 2 percent, at 547.92.

Overseas, Japan's Nikkei stock average fell 0.1 percent. In Europe, Britain's FTSE 100 closed up 0.2 percent, France's CAC-40 slipped 0.2 percent for the session and Germany's DAX index dropped 0.3 percent.

Reuters and The Associated Press contributed to this report.