Fears about the economy and unrest in the Middle East sent indexes skidding below key technical levels on Thursday as the near-term outlook for stocks grew cloudy.

All three major indexes fell below their 50-day moving averages, a medium-term momentum indicator that many traders see as a sign of a market inflection point.

Volume was on track for an above-average day while declining stocks outstripped advancers by six to one on NYSE.

A ratings agency's downgrade of Spain, an unexpected swing to a trade deficit in China and U.S. jobless data were the initial catalysts for the selloff.

Selling was aggravated in the early afternoon after reports that authorities in Saudi Arabia had opened fire on demonstrators, which caused oil prices to pare losses.

Energy stocks were the biggest drag after recent gains. The S&P's energy sector <.GSPE> lost 3 percent, with Exxon Mobil and Chevron Corp each down 3 percent.

Peter Andersen, a portfolio manager at Congress Asset Management in Boston, said the confluence of events was hurting investor sentiment.

They're adding all those things up and coming up with a fairly negative scenario, he said.

The Dow Jones industrial average <.DJI> fell 212.21 points, or 1.74 percent, to 12,000.88. The Standard & Poor's 500 Index <.SPX> lost 22.41 points, or 1.70 percent, to 1,297.61. The Nasdaq Composite Index <.IXIC> dropped 47.38 points, or 1.72 percent, to 2,704.34.

The CBOE Volatility Index or VIX <.VIX>, Wall Street's favorite gauge of investor fear, was up 5.3 percent at 21.30 in late afternoon trading.

Analysts have been calling for a correction in the market after its big run up since early September. The S&P 500 is up roughly 25 percent since then.

However, many investors have been using dips to increase exposure to stocks in the belief that longer-term economic fundamentals point to a slow steady recovery.

I do think it is a buying opportunity, said Andersen, who said he had been buying stocks over the course of the day. I'm adding to names that I've always liked.

The benchmark S&P 500 index fell below its 50-day moving average, an indication of medium-term momentum for the market, for the first time since November.

An index of semiconductors <.SOX>, among the market's weaker areas this week, lost 2.1 percent.

Brent crude oil futures pared losses after reports from Saudi Arabia said police had fired on protesters. Brent slipped 51 cents to settle at $115.43 per barrel.

Two areas hit this week are energy and semis, and these are two of the best areas so far this year, said Eric Marshall, director of Research, Hodges Capital Management, Dallas, Texas.

The energy index is up 9 percent since the start of the year, while the semi index is up 3.7 percent. The S&P 500 is up 3.4 percent since the end of December.

Copper ended down for a second straight session after surprisingly soft Chinese trade data underscored global growth concerns. The S&P materials sector index<.GSPM> fell 1.7 percent.

U.S. government data showed initial claims for state unemployment benefits increased 26,000 to a seasonally adjusted 397,000 and the U.S. trade deficit widened much more than expected in January to $46.3 billion.

Moody's one-notch downgrade of Spain, based on the costs of restructuring its banks, came with a warning that further cuts were possible. The agency downgraded Greece's debt earlier this week.

China swung to an unexpected trade deficit in February of $7.3 billion, its largest in seven years, but economists said the drop was likely temporary.

(Reporting by Edward Krudy; Additional reporting by Caroline Valetkevitch, Charles Mikolajczak and Doris Frankel; Editing by Jan Paschal)