Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A steep, late-afternoon sell-off in technology companies pulled U.S. stocks sharply lower Tuesday, knocking 344 points off the Dow Jones industrial average.

The market slide erased modest gains from earlier in the day and much of a powerful rally from the day before.

Banks also weighed on the market as bond yields declined. Investors bid up shares in safe-play stocks like utilities and real estate companies.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The market turbulence came a day after the major stock indexes notched their best day in more than two years following a steep slide last week.

"Just looking at the sector performance indicates to me this is a flight-to-safety kind of trade day," said Sam Stovall, chief investment strategist at CFRA Research. "Until we get better guidance as to whether this correction is truly over, we will take a very choppy rise, possibly to new highs, a few months down the road."

The Standard & Poor's 500 index fell 45.93 points, or 1.7 percent, to 2,612.62. The Dow tumbled 344.89 points, or 1.4 percent, to 23,857.71. The 30-company average had been down 493 points. A day earlier, it climbed 669 points.

The tech-heavy Nasdaq slid 211.74 points, or 2.9 percent, to 7,008.81. The Russell 2000 index of smaller-company stocks gave up 30.15 points, or 1.9 percent, to 1,513.57.

The major stock indexes appeared headed for more gains early Tuesday after their strong finish on Monday, but the rally didn't last.

Stocks wavered through much of the morning, recovered somewhat by early afternoon, but then veered sharply lower as investors sold shares in Nvidia, Twitter, Facebook and other technology companies.

Social media companies also weighed on the market. Twitter slumped 12 percent after Citron Research said it was shorting the company, citing Twitter's reliance on licensing its users' data. The remarks come ahead of a Senate hearing on data privacy set for next month. The stock price lost $3.84 to close at $28.07.

Facebook, whose shares have been hard hit recently amid heightened government scrutiny into the social media giant's collection of private user data, also declined, sliding another $7.84, or 4.9 percent, to $152.22. Facebook has lost 20 percent of its value since hitting a record high Feb. 1.