The tech-heavy Nasdaq was lifted by gains in stocks like Gilead (>> Gilead Sciences, Inc.) and Microsoft (>> Microsoft Corporation).

The three major U.S. stock indexes had opened higher on hopes of easing tensions between the two countries, but came under pressure when Ukraine, contradicting a report from Russia's Defense Ministry, said it had shelled a Russian armored column.

"What we saw was just a bit of a knee-jerk reaction to the headlines," said Robert Pavlik, chief market strategist at Banyan Partners LLC in New York.

"I think the fact that the market sold off relatively hard on the Ukraine report but came back in the last hour or so is a reflection of us not getting any additional confirmation on the Russian column being attacked."

The CBOE Volatility Index <.VIX>, Wall Street's fear barometer, shot up as much as 20.3 percent to a session high at 14.94. At the close, though, the VIX was up 5.9 percent at 13.15. Investors rushed to buy safe-haven bonds and the 10-year U.S. Treasury note yield at one point dropped to 2.30 percent, its lowest level since June 2013.

The Dow Jones industrial average <.DJI> fell 50.67 points, or 0.30 percent, to close at 16,662.91. The S&P 500 <.SPX> dipped 0.12 of a point, or 0.01 percent, to end at 1,955.06. The Nasdaq Composite <.IXIC> added 11.93 points, or 0.27 percent, to end at 4,464.93.

At one point during the selloff, the Dow briefly turned negative for the year when it touched a session low at 16,575.42. The S&P 500 fell as low as 1,941.50 while the Nasdaq touched an intraday low at 4,427.13.

For the week, the Dow rose 0.7 percent, the S&P 500 gained 1.2 percent and the Nasdaq climbed 2.2 percent.

The stock of Gilead Sciences Inc (>> Gilead Sciences, Inc.) rose 3.3 percent to $99.49. Gilead contributed the most to the Nasdaq's gain, in terms of index points. The biotech company said on Friday that an arbitration panel ruled in its favor and rejected a patent infringement claim brought by Roche Holding AG (>> Roche Holding Ltd.).

Applied Materials Inc (>> Applied Materials, Inc.), up 6.3 percent at $22.48, also gave the Nasdaq a major boost a day after the chip equipment maker reported quarterly earnings that beat expectations.

Shares of Monster Beverage Corp (>> Monster Beverage Corp) jumped 30.5 percent to $93.49 a day after Coca-Cola Co (>> The Coca-Cola Company) said it was buying a 16.7 percent stake in the company for $2.15 billion. The rally in Monster's stock helped both the Nasdaq 100 <.NDX> and the S&P 500. Coca-Cola, a Dow component, gained 1.7 percent to close at $40.88.

In the latest snapshot of the economy, U.S. manufacturing output rose broadly in July and automobile production recorded its largest increase in five years. Other data, however, showed some cooling in factory activity. U.S. consumer sentiment fell in August to its lowest since last November, according to a preliminary reading from the Thomson Reuters/University of Michigan.

About 5.9 billion shares traded on all U.S. platforms, according to BATS exchange data, compared with the five-day average of 5.1 billion.

(Editing by Bernadette Baum, James Dalgleish, Nick Zieminski and Jan Paschal)

By Akane Otani