Stocks fell Tuesday but closed only with slight losses as crude oil prices, which cracked the $54-a-barrel barrier early in the session, ended sharply down. The market drew support from upbeat earnings news from Johnson & Johnson and Merrill Lynch.

The blue-chip Dow Jones industrial average (search) 4.79 points, or 0.05 percent, at 10,077.18. The Standard & Poor's 500 Index (searchwas down 2.55 points, or 0.23 percent, at 1,121.84. The technology-laced Nasdaq Composite Index (searchwas down 3.59 points, or 0.19 percent, at 1,925.17.

Initially, Wall Street's worries over oil grew as the International Energy Agency raised its forecast for world demand, and as price speculation increased after the Russian government ordered the sale of part of Yukos, that nation's top producer, to pay back taxes. While that pushed oil prices to a new intraday high of $54.45 in early trading, prices later fell sharply in what analysts suggested was an overdue correction in prices.

A barrel of light crude settled at $52.51, down $1.13, on the New York Mercantile Exchange (search).

"I think this market is keyed in on oil and is ready to go if oil drops," Bill Groenveld, head trader for vFinance Investments, said of stocks. "As soon as we see any relief in oil, and who knows when that will happen, I think the market starts to move north if there's no earnings surprises this time around."

Oil prices have soared 65 percent this year. The spike in crude is a major concern for Wall Street, as higher energy costs squeezes profits from most companies, while a rise in fuel prices can curb consumer spending.

"The market has come back a little and most of the explanation can be attributed to crude oil coming down a dollar," said Mike Driscoll, Bear Stearns listed trader and managing director.

"But I'm not so sure that a 2 percent pullback in oil is too much to get excited about. Crude has been on such a tear all year, and I'd be hesitant to say this is the end of the crude rally."

The drop in oil also allowed investors to enjoy positive earnings from Johnson & Johnson (JNJ), as well as a fairly good outlook from Merrill Lynch & Co. Inc.(MER) , even though revenues at the brokerage were lower than expected. The bulk of earnings reports are still to come over the next few weeks.

Johnson & Johnson gained $1.46 to $56.82 after beating both revenue and earnings estimates for the third quarter. Profits rose 13 percent from a year ago. Prescription drug and over-the-counter skin care sales helped boost revenues.

A rough quarter for the markets hurt Merrill Lynch's earnings, as revenues fell 3 percent and earnings dropped 8 percent for the third quarter. The company blamed unusually light trading on Wall Street for lower revenues, which missed analysts' forecasts, though the brokerage managed to surpass Wall Street earnings expectations by a penny per share and gave a brighter outlook for the fourth quarter. Merrill Lynch rose $1.48 to $52.48.

M&T Bank Corp. (MTB) climbed $1.87 to $101.70 after it credited a strong loan business and higher interest income for a 19 percent surge in third-quarter profits. The company beat earnings expectations by 5 cents per share.

Chip makers were lower after Philips (PHG), Europe's biggest consumer electronics firm, gave a cautious outlook. Philips fell 3.3 percent, or 78 cents, to $22.79 in New York.

Intel (INTC) reported a rise in third-quarter profit as strength in its personal computer business outweighed weakness in memory chips. Earnings were $1.9 billion, or 30 cents a share, compared with a year-earlier profit of $1.66 billion, or 25 cents a share. Revenue rose to $8.5 billion from $7.8 billion last year.

Intel's stock fell 33 cents to $20.28, a 1 percent drop in regular trading. After hours, its shares rose to $20.84 on the INET electronic brokerage, a 2.8 percent rise.

Semiconductor chips were lower overall, with the Philadelphia Stock Exchange Semiconductor Index (search) down 1.32 percent.

According to media reports, General Motors Co. (GM) will cut 12,000 jobs in Europe, one in six of its European workers, as part of a broad restructuring of its operations there. General Motors was up 38 cents at $41.80.

Trading was active, with 1.3 billion shares changing hands on the New York Stock Exchange, just below the 1.4 billion daily average for last year. About 1.5 billion shares were traded on Nasdaq, below the 1.69 billion daily average last year.

Decliners outnumbered advancers on the NYSE and the Nasdaq by about 6 to 5.

The Russell 2000 index of smaller companies was down 0.85, or 0.2 percent, at 576.71.

Overseas, Japan's Nikkei stock average slid 1.3 percent. In Europe, Britain's FTSE 100 closed down 0.8 percent, France's CAC-40 fell 1 percent for the session and Germany's DAX index dropped 1.5 percent in late trading.

Reuters and the Associated Press contributed to this report.