Stocks rose cautiously Tuesday as oil prices dipped and as investors welcomed Federal Reserve Chairman Alan Greenspan's (search) assurance that the recent rise in energy costs was unlikely to damage the economy.

The Dow Jones industrial average (search) was up 37.32 points, or 0.36 percent, to close at 10,458.46. The Standard & Poor's 500 Index (search) was up 5.27 points, or 0.45 percent, to end at 1,181.39. The Nasdaq Composite Index (search) was up 8.25 points, or 0.41 percent, to finish at 1,999.32.

Speaking before a group of U.S. petrochemical producers, Greenspan said more refining capacity was needed around the world, but that energy demand was already starting to soften, a trend that could help bring prices down. That assessment of the oil situation, investors believed, could keep the Fed from raising rates aggressively, since it appeared unlikely that inflation would accelerate due to higher prices.

Analysts, however, said that for the short-term, Greenspan's comments didn't change the fact that oil, which traded above $58 a barrel on Monday, remains near record highs, and interest rates are on the rise, gradually or not. The result was a trendless session on Wall Street that showed only a modest response to Greenspan's comments.

"Nothing has really changed for the market. You have rising rates, decelerating earnings growth and you've got energy prices," said Russ Koesterich, senior portfolio manager at Barclay's Global Investors in San Francisco. "Energy continues to be a drag on the market because, sure, you're down $1 a barrel today, but these prices are still high and they'll start to bite into consumer spending at some point."

Crude oil futures dropped minutes after his prepared remarks were released, with a barrel of light crude down 76 cents to $56.25 on the New York Mercantile Exchange (search).

Bonds were down narrowly, with the yield on the 10-year Treasury note rising to 4.47 percent from 4.46 percent late Monday. The dollar was narrowly mixed against other currencies, while gold prices rose.

Pfizer (PFE), a component of the blue-chip Dow, was the blue-chip Dow average's biggest percentage gainer, up nearly 4 percent, or 97 cents, at $26.90. That ignited other pharmaceutical stocks such as Merck & Co.(MRK) , up 1.7 percent, or 54 cents, at $33.04.

"The market had been looking for Pfizer to take an initiative. More recently, there were fears it might be an anticlimax, but it looks like they really are taking a scalpel to the business," said Max Herrmann, an analyst with ING Financial Markets.

Stocks briefly trimmed their gains after Moody's Investors Service (search) cut General Motors Corp.'s (GM) debt ratings to a step above junk status, citing the company's formidable problems, including high costs and declining market share. But GM's shares were little affected by the close of trading, down 1 cent at $29.04.

"The market sold off pretty close to the GM debt downgrade," said Brian Williamson, vice president, equity trading at The Boston Co. Asset Management. "There was a temporary blip, but the market's re-adjusted."

Among advancing stocks was J.P. Morgan Chase & Co. (JPM), up 2.4 percent, or 81 cents, at $34.58, which some traders said was benefiting from bargain hunting.

"Expectations may have gotten pounded down too low for J.P. Morgan relative to its peers," said Jeffery Harte, analyst at Sandler O'Neill & Partners LP, Chicago.

Shares of Google Inc. (GOOG) gained 1.8 percent, or $3.28, to $188.57 after it was upgraded by Lehman Brothers, helping to lift other Internet stocks.

Morgan Stanley (MWD) was down $1.85 at $56.45 after the company announced late Monday it would spin off its Discover Card unit into a separately traded company. Few analysts said the spinoff would result in increased value for either company, and Lehman Brothers downgraded Morgan Stanley's stock after the announcement.

Verizon Communications Inc. (VZ) rose 17 cents to $35.82 after the Dow component said it will drop its $7.5 billion bid for MCI Inc. (MCIP) if MCI says the recent $8.9 billion counter-bid by Qwest Communications International Inc. (Q) is superior. Qwest fell a penny to $3.81, while MCI slipped 11 cents to $24.97.

Analysts at Lehman Brothers cut their profit forecasts for The Home Depot Inc. (HD) for the quarter, 2005 and 2006, claiming that poor weather in the Northeast, deflationary trends in lumber prices and rising energy costs would all weigh on the company's earnings. Home Depot lost 9 cents to $37.82.

Online music service Napster Inc. (NAPS) raised its quarterly profit forecasts for the second time in a month due to better-than-expected sales and subscriptions. Napster surged $1.02, or 16.5 percent, to $7.19.

Overall, trading was active, with 1.48 billion shares changing hands on the New York Stock Exchange, just above the 1.46 billion daily average for last year. About 1.69 billion shares were traded on Nasdaq, below the 1.81 billion daily average last year.

Advancers outnumbered decliners on the New York Stock Exchange by about 9 to 7 and by about 8 to 7 on Nasdaq.

The Russell 2000 index of smaller companies was up 0.74, or 0.1 percent, at 614.50.

Overseas, Japan's Nikkei stock average rose 0.92 percent. In Europe, Britain's FTSE 100 was up 0.94 percent, Germany's DAX index gained 0.49 percent, and France's CAC-40 climbed 0.88 percent.

Reuters and the Associated Press contributed to this report.