Stocks tumbled on Tuesday after investors were blindsided by a surprise call for a Greek referendum on an EU bailout plan, casting doubt on the sustainability of the recent market rally.

The S&P 500 has slid more than 5 percent so far this week in moves reminiscent of the stomach-churning market swings seen over the past two months and after investors thought the worst of the euro zone debt crisis was over.

The speedy pullback comes after stocks rebounded to post their best month in 20 years in October. The gains were fueled by hope for an eventual deal to rescue Greece, finally agreed upon at last week's European Union summit.

The fact that we gave it back as quick as we did in two days is very concerning, said Ari Wald, an analyst at Brown Brothers Harriman.

It looks very much as though it was a lot of short-covering, a lot of bears found themselves on the wrong side of the trade, he said of the October rally.

Analysts said if Greek voters reject the unpopular bailout in a vote proposed by Greek Premier George Papandreou, it would likely result in a hard default by Greece, causing bigger losses for banks and raising the threat of systemic risk.

The news slammed European stocks, particularly the region's banks, which slumped 6 percent. U.S. banks were also hit hard. Morgan Stanley, which investors worry has heavy exposure to Europe, fell 8 percent to $16.23.

Indexes swung sharply as successive European lawmakers lined up behind the bailout package but returned to close near session lows after a Greek government spokesman said the prime minister told his cabinet the referendum would go ahead.

The Dow Jones industrial average fell 297.05 points, or 2.48 percent, at 11,657.96. The Standard & Poor's 500 Index lost 35.02 points, or 2.79 percent, at 1,218.28. The Nasdaq Composite Index dropped 77.45 points, or 2.89 percent, at 2,606.96.

The selloff came on sharp spike in volume with 10.3 billion shares traded on the NYSE, the Amex, and the Nasdaq, 22 percent above its 20-day moving average, while the CBOE volatility index jumped 16 percent to 34.77, its highest since around mid-October.

Nearly six stocks fell on the NYSE for every one that rose.

Adding to the gloom, factory activity in Asia's big export economies slowed to the weakest rate in nearly three years in October, while UK manufacturing suffered a sharp decline, reigniting fears of a global slowdown.

The S&P 500 traded below its 14-day moving average for the first time since October 7, pointing to a possible shift in short-term momentum. The benchmark also broke through support at 1,220.

Wald said the S&P 500's 50-day moving average was now key support on the downside.

You have got to cut it short at that 50-day moving average, he said. If we can't hold the 50-day, which is around 1,190, it wouldn't be a very good technical picture.

Economic data showed the pace of growth in the U.S. manufacturing sector slowed in October, though improvement in new orders suggested resiliency in the sector.

If we can keep Europe out of the headlines and Washington out of the headlines and just focus on the economic data and the corporate data we'd be in great shape, said John Canally, investment strategist and economist for LPL Financial in Boston.

In a move that put further pressure on commodity prices, Japan vowed to step into foreign exchange markets again. The government sold a record $98.7 billion on Monday in yen to curb its strength, which is hurting Japan's export-based economy.

The U.S. dollar index rose 1.5 percent. U.S. oil futures settled 1.07 percent down at $92.19, and copper prices fell 3 percent. Many commodities are priced in the greenback, making a spike in dollar prices more expensive for traders in other currencies and saps demand.

(Editing by Kenneth Barry)