The Dow and S&P 500 closed down but well off the day's lows in a volatile session on Thursday, suggesting investors aren't ready to give up on the market's rally.

The S&P 500 opened lower on deepening concerns that higher oil could stifle economic activity. Stocks hit their worst levels when Brent crude neared $120 a barrel on Libya's turmoil, but a drop in oil prices prompted a corresponding recovery in stocks.

Based on the latest available data, the Dow Jones industrial average <.DJI> was down 37.28 points, or 0.31 percent, to end unofficially at 12,068.50. The Standard & Poor's 500 Index <.SPX> was down 1.30 points, or 0.10 percent, to finish unofficially at 1,306.10. But the Nasdaq Composite Index <.IXIC> was up 14.91 points, or 0.55 percent, to close unofficially at 2,737.90.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)