Updated from 4:14 p.m. EST

Tech stocks charged ahead and blue chips used a late rally to close slightly higher, shaking off early weakness and overcoming a selloff in mining and energy shares.

The Dow Jones Industrial Average added 6.17 points, or 0.05%, to 12,480.69, and the S&P 500 was up by 1.74 points, or 0.12%, at 1418.34. The Nasdaq Composite jumped 30.27 points, or 1.25%, to 2453.43.

Chip giant Intel ( INTC) helped to boost the tech-heavy Nasdaq. Shares rose 3.7% after Banc of America raised its first-quarter and full-year 2007 earnings estimates for the company.

Volume weakened. More than 2.51 billion shares changed hands on the New York Stock Exchange, and decliners and advancers were matched evenly. Volume on the Nasdaq was roughly 2.17 billion shares, with winners edging losers 17 to 13.

One of the key stories of the session took place in the commodities arena, where crude futures extended the prior day's free fall that pulled prices to their lowest level in 19 months.

The decline came after the Energy Department's weekly inventory report, which showed that crude supplies fell by 1.3 million barrels. Distillates rose by 2 million barrels, and gasoline stocks were higher by 5.6 million barrels.

Oil prices dropped $2.73 to close at $55.59 a barrel in Nymex floor trading, bringing the two-day slide to 8.9%.

By sector, semiconductor stocks were among the top gainers of the session. The Philadelphia Semiconductor Sector Index jumped 2%. Oil stocks were among the hardest hit, with the Philadelphia Oil Service Sector Index losing 2.9% and the Amex Oil Index down 1.9%.

If you liked this article you might like

Paradigm Opportunity Protects Investors in Tough Times

5 Things You Need to Know Before the Stock Market Opens (Correct)

U.S. Investors Brace for a Third Bailout in Greece

5 Things You Need to Know Before the Stock Market Opens

40 Hedge Funds' Best Stocks Show the Way for 2012 (Update 1)