Stocks pared losses on Thursday, with the Nasdaq turning positive, after sources said Greece had won the consent of inspectors from the European Union and International Monetary Fund for a new five-year austerity plan.

The S&P and Dow sharply rebounded on the Reuters report from Athens, based on sources with knowledge of the talks. The development set the stage for a hoped-for resolution to Greece's credit problems that hurt investor sentiment around the globe.

This is obviously a positive for the market since it kicks the can down the road and lets us get that off the table for the moment, said Mickey Cargile, managing partner of WNB Private Client Services in Midland, Texas.

It allows us to look at the 100 other things we worry about everyday, but since we've had this big selloff over the past week, it gives the market a reason to pause and in my opinion stop going down.

Earlier, markets had sold off as a sharp drop in oil triggered declines in a fragile market after Federal Reserve Chairman Ben Bernanke's comments about a slowing economic recovery a day earlier.

The Dow Jones industrial average <.DJI> dropped 83.66 points, or 0.69 percent, to 12,026.01. The Standard & Poor's 500 Index <.SPX> fell 7.10 points, or 0.55 percent, to 1,280.04. But the Nasdaq Composite Index <.IXIC> gained 11.94 points, or 0.45 percent, to 2,681.13.

U.S. crude oil futures lost 4.4 percent after the International Energy Agency said it will release 60 million barrels of oil from strategic stockpiles to help the global economy.

The S&P 500 came within less than a half point of its 200-day moving average, a line the bulls have been able to hold since last September. Technical analysts monitor that level as an indication of the long-term trend, and a consistent close below it could trigger more selling.

The bounce off the 200 day average on the S&P 500 is the second in a week. Last Thursday, a brush with that level enticed buyers and the benchmark closed in the black for the day. The 200-day moving average now coincides with the 2010 intraday high of 1,262.60, giving it extra technical support.

(Reporting by Rodrigo Campos; additional reporting by Ryan Vlastelica; Editing by Kenneth Barry)