NEW YORK — U.S. stocks fell Wednesday, erasing gains that sent the Standard & Poor’s 500 index to within three points of a record, on concern the situation in Ukraine may escalate after President Barack Obama said the international order is being tested.

NEW YORK — U.S. stocks fell Wednesday, erasing gains that sent the Standard & Poor’s 500 index to within three points of a record, on concern the situation in Ukraine may escalate after President Barack Obama said the international order is being tested.

Facebook sank the most since September 2012 after buying virtual-reality headset maker Oculus VR. King Digital Entertainment, the maker of the "Candy Crush" smartphone game, slumped 16 percent on the first day of trading.

The S&P 500 fell 0.7 percent to 1,852.56, with declines accelerating in the final hour of trading. The Dow Jones industrial average lost 98.89 points, or 0.6 percent, to 16,268.99. The Russell 2000 index sank 1.9 percent for its biggest drop in almost two months. About 7.2 billion shares changed hands on U.S. exchanges, 6.8 percent more than the three-month average.

"Investors around the world have been waiting to see what kind of reaction the United States and the EU would really take regarding Russia’s annexation of Crimea beyond sanctions," Frederic Dickson, chief investment strategist who helps oversee $44.5 billion at D.A. Davidson & Co. in Lake Oswego, Ore., said in a telephone interview. "Any hints of escalation in terms of rhetoric or action would probably trigger investors to stand back and take recent profits."

The equities benchmark closed at its session low, erasing nine points in the final hour of trading. Wednesday’s drop trimmed the index’s gain this year to 0.2 percent. It remains on course for a fifth consecutive quarterly gain, a feat it has accomplished just seven times since its creation in 1957.

Investors continued to sell riskier assets, as gauges of Internet and biotechnology shares sank, while the Russell small- cap index slid to the lowest since Feb. 19.

The Nasdaq Internet index retreated 2.5 percent for a sixth day of losses and is down 11 percent since a high on March 6 amid concern that some stocks may have been risen too far too fast. The iShares Nasdaq Biotechnology exchange-traded fund lost 1.8 percent to the lowest level since Jan. 9.

The Chicago Board Options Exchange volatility index, a gauge for U.S. stock volatility known as VIX, rose 6.5 percent to 14.93 today.

Obama, speaking in Brussels, warned of consequences of complacency in Ukraine and said Russia’s actions must be met with condemnation. Ukraine and the International Monetary Fund are nearing the end of bailout talks today as the United States and its European allies warned they’ll further penalize Russia if it intensifies the crisis after annexing Crimea.

Earlier gains in the S&P 500 followed economic data that showed the economy is expanding at a rate that investors speculated won’t spur faster interest rate increases.

Three rounds of bond purchases from the Fed have helped fuel economic growth, sending the S&P 500 up as much as 178 percent from its 2009 low. The rally has pushed the index’s price-earnings ratio to 17.2. While the multiple is near the highest level in four years, it’s close to the average since 1937, according to data compiled by Bloomberg and S&P.

Fed Bank of St. Louis President James Bullard said Wednesday that policy makers haven’t committed to a specific month to end the bond purchases even as it would take a significant shift in the outlook to alter the path of tapering. Fed Chair Janet Yellen said on March 19 that the central bank’s stimulus program could end this fall and benchmark interest rates may rise about six months later.

American factories received fewer orders for machinery, communications gear and computers in February, signaling business investment is slowing after an unusually harsh winter put a damper on sales, data from the Commerce Department showed today. The S&P 500 rose 0.4 percent yesterday after data showed confidence among American consumers at a six-year high.

Nine of the 10 main S&P 500 groups dropped. Raw-materials producers and technology shares fell the most, with each losing at least 1.3 percent.

The Nasdaq Composite index dropped 1.4 percent Wednesday and has fallen 3.1 percent since Yellen’s remarks.

Facebook slid 6.9 percent to $60.39. The world’s largest social network said Tuesday that it will spend $2 billion to buy Oculus, expanding into wearable hardware for the first time. Facebook shares rallied 158 percent in the past 12 months through Tuesday.

Zynga, a developer of games for smartphones and tablets, dropped 4.1 percent to $4.64. The stock surged 33 percent in the first two months of this year.

King Digital tumbled 16 percent to $19. The company Tuesday raised $500 million in its initial public offering, pricing the shares in the middle of the marketed range.

Peabody Energy fell 2.7 percent to $15.80. UBS cut coal stocks including Peabody to neutral from buy, saying it expects "more financial distress" in the industry over the next one or two years amid an oversupply.

Health-care companies were the only group among 10 to advance in the S&P 500 on Tuesday.

Laboratory Corporation of America Holdings climbed 4.2 percent to $98.64 while Quest Diagnostics increased 5.6 percent to $57.99. The companies will benefit after the House of Representatives last night released a bill that included an adjustment to clinical lab payment rates, Michael Cherny, an analyst with International Strategy & Investment Group, said in a note.

DirecTV jumped 5.7 percent to $77.34. Dish Network Chairman Charlie Ergen recently contacted DirecTV CEO Mike White to discuss a merger of the two satellite television companies, according to several people with knowledge of the matter. Dish rose 8.5 percent to $63.38.

PVH rose 3.6 percent to $121.43. The maker of apparel and footwear said it earned $1.43 a share in the fourth quarter, higher than the $1.40 projected earlier.