U.S. stocks ended barely changed on Tuesday, pulling off earlier lows after tracking the price of oil, although a brokerage downgrade of technology bellwether Intel Corp. (INTC) hurt chip stocks.

U.S. light crude for January delivery ended up 30 cents at $48.94 a barrel, but that marked a retreat from its session high at $50.25 on the New York Mercantile Exchange. After crude topped $50 a barrel during the session, that reawakened concerns over corporate profit margins and sent the stock market lower.

"The direction of the market appears to be almost totally governed by the price of crude," said Tim Ghriskey, chief investment officer of Solaris Asset Management.

"It is a major impact on consumer confidence and corporate earnings and on consumer spending. Having to pay $2-plus at the gas pump crowds out other spending."

The Dow Jones industrial average was up 3.18 points, or 0.03 percent, to close at 10,492.60. The Standard & Poor's 500 Index was down 0.30 of a point, or 0.03 percent, at 1,176.94. The technology-laced Nasdaq Composite Index was down 0.91 of a point, or 0.04 percent, at 2,084.28.

Trading was active, with 1.4 billion shares changing hands on the New York Stock Exchange, the same as the daily average for last year. About 2.09 billion shares were traded on Nasdaq, above the 1.69 billion daily average last year.

Advancers outnumbered decliners on the NYSE by a ratio of about 5 to 3, and on Nasdaq, by 9 to 7.

Dealers said that volume was likely to tail off as investors wind down for the Thanksgiving holiday on Thursday when the stock market is closed. On Friday, trading will end early at 1 p.m.

"There are a lot of investors that are either physically or mentally on vacation this week," Ghriskey said.

"Trading volume does dry up over this period — but it is a very important period for the market, especially with Black Friday [the day after Thanksgiving], which is the heaviest shopping day of the year. There will be a lot of talk about retailers in general."

After the closing bell, shares of H&R Block, the world's largest tax services company, fell nearly 3 percent to $47.07. The company posted a quarterly loss and cut its outlook for the year. During the regular session, H&R Block fell 15 cents to $48.45.

With crude prices ending below their session highs, shares of energy companies also trimmed gains. Exxon Mobil Corp. rose 29 cents to $51.20, off a fresh 52-week high of $51.27 hit earlier in the session.

The dollar extended its string of lows against the euro, which rose to $1.3105. A weak greenback hurts the stock market by making U.S. assets less attractive to foreign investors.

Semiconductors were hit after Credit Suisse First Boston cut its rating on Intel, the world's largest chip maker, to "underperform" from "outperform." Intel fell 3 percent, or 73 cents, to $23.37, while the Philadelphia Semiconductor Index slipped 0.73 percent.

Insurer American International Group Inc. (AIG), a Dow component, gained 2.2 percent, or $1.35, to $64.20 after saying it reached preliminary accords to settle criminal and regulatory probes into products it sold that might have helped companies inflate earnings.

Shares of Time Warner Inc. (TWX) helped support the S&P 500, rising 2.8 percent, or 48 cents, to $17.94, after a report that the world's largest media company was near a settlement with regulators that could limit potential shareholder lawsuits over probes into accounting at its America Online unit.

The steel sector was also lower. A UBS report said monthly short interest for U.S. steel stocks — investor bets that steel stock prices will go down — was near 4-year highs. U.S. Steel Corp. dropped 1.9 percent, or 91 cents, at $48.09.