Stocks closed higher Thursday as a late buying spree, fueled by energy companies and semiconductor shares, offset a four-month high in crude oil prices and mediocre economic data.

The Dow Jones industrial average (search) closed up 75 points, or 0.70 percent, at 10,748.79. The Standard & Poor's 500 Index (search) was up 9.40 points, or 0.79 percent, at 1,200.20. The technology-laced Nasdaq Composite Index (search) rose 20.45 points, or 1.01 percent, to 2,051.70.

Oil prices rose on expectations of continuing cold weather in the United States that should boost demand for thinning heating fuel inventories. On the New York Mercantile Exchange, April crude was 28 cents higher at $51.45 after soaring to $52.05, the highest level since the Nov. 1 peak of $52.50.

Some traders said markets were relieved oil prices did not go even higher. Rising oil prices lift shares of energy companies but also raise concerns that higher energy costs will pinch most companies' profits and curb consumer spending.

"I think you are seeing a little bit of a relief rally," said Jim Fehrenbach, head of Nasdaq trading at Piper Jaffray, Minneapolis.

Exxon (XOM) rose 2.9 percent to $61.13. ConocoPhillips (COP) edged up $2.98, or 2.8 percent, to $110.18 and ChevronTexaco (CVX) gained $1 to end at $61.16.

Fehrenbach and other investors said market rumors of an imminent broker upgrade for semiconductor stocks helped technology shares rally.

Combined with the rather unimpressive economic data showing a slight rise in unemployment and a dropoff in orders for big-ticket items, the fact that the markets did not slide further earlier in the session boosted investors' confidence.

"I think you're seeing a lot of institutional money that was put to work this afternoon," said Chris Johnson, manager of quantitative analysis at Schaeffer's Investment Research in Cincinnati. "Stocks traded pretty narrowly most of the day but didn't give ground, and we're seeing a bounce off that."

Wall Street was unimpressed with the government's latest economic data, which contributed to the market's early uncertainty. The Commerce Department (search) said orders for durable goods — items built to last at least three years — fell 0.9 percent in January, the worst showing in three months. And the Labor Department (search) reported a larger-than-expected increase in first-time unemployment claims.

The middling economic figures failed to lift the dollar, which fell against the euro and was mixed against other currencies. Gold rose modestly, while bonds slipped following the oil inventory report, with the yield on the 10-year Treasury bond rising to 4.29 percent.

The Nasdaq was helped by cell phone chip-maker Qualcomm Inc. (QCOM ), which jumped 4 percent to $35.51, and the world's biggest semiconductor maker Intel Corp. climbed 1.7 percent to $23.70.

Search engine companies Google Inc. (GOOG) and Yahoo Inc. (YHOO) fell after RBC Capital Markets reduced its ratings on the companies. Google fell 2.6 percent to $188.89 and Yahoo slipped 2 percent to $31.48.

Michael Bee, lead equity strategist for Boyd Watterson Asset Management LLC, said, "These companies are selling at lofty valuations and from a fundamental approach seem to be overpriced and will continue to be volatile stocks."

Media conglomerate Viacom Inc. (VIAB) fell 2 percent to $35 after it posted a huge loss on $18 billion in asset write-downs. The results before the charges exceeded Wall Street estimates but the company offered a cautious outlook.

Qwest Communications International Inc. (Q) rose 3.7 percent to $4.20 after sources familiar with the situation said it is planning to revise its $8 billion bid for MCI Inc. either on Thursday or Friday and include a greater portion of cash than in the original offer. MCI was up 1.1 percent at $23.21.

Tech stocks fell along with companies that run Internet search engines. Time Warner Inc. (TWX)announced its America Online unit would launch its own search engine for local information, which investors saw as a new phase in the battle for Internet searchTime Warner was down 34 cents at $17.38, while Ask Jeeves Inc. (ASK ) shed $1.48 to $21.77.

Department store chain J.C. Penney Co. Inc. (JCP) lost 5 cents to $44.10 although the company swung to a profit in the fourth quarter and beat Wall Street profit forecasts by 5 cents per share. The company also gave a strong outlook for the current quarter's sales.

Staples Inc. (SPLS ) climbed 49 cents to $32.30 after the top U.S. office products retailer posted a sharp increase in quarterly profit that matched expectations but said earnings per share for the current year would be near the low end of analysts' estimates.

Krispy Kreme Doughnuts Inc. (KKD) skidded 39 cents to $5.36 after the company said it is the subject of a probe by the Justice Department. The Securities and Exchange Commission is already investigating the company's accounting.

Trading in stocks was active, with 1.51 billion shares changing hands on the New York Stock Exchange, above last year's daily average of 1.46 billion. About 2.03 billion shares were traded on Nasdaq, above last year's 1.81 billion daily average.

Advancers outnumbered decliners by about 2-to-1 on the NYSE and by about 19-to-12 on Nasdaq.

The Russell 2000 index of smaller companies was up 7.02, or 1.13 percent, at 627.56.

Overseas, Japan's Nikkei stock average rose 0.27 percent. In Europe, Britain's FTSE 100 closed down 0.33, France's CAC-40 gained 0.01 percent for the session, and Germany's DAX index fell 0.15 percent.

Reuters and the Associated Press contributed to this report.