An unexpectedly strong report on U.S. payrolls propelled stocks higher on Friday for the first time this week, but indexes retreated from highs after speculation Greece might leave the euro zone.

The largest boost to U.S. equities Friday was a government report showing non-farm payrolls increased by 244,000 in April, the most in 11 months and well above economists' expectations, according to Brian Jacobsen, chief portfolio strategist at Wells Fargo Funds Management in Menomonee Falls, Wisconsin.

But stocks came off highs after a German news report, later denied, that Greece had raised the possibility of leaving the euro zone.

Speculation on Greece leaving the euro zone and uncertainty as to what that means kept some people wary of going long into the weekend, Jacobsen said.

He added that a close above 1,340 (on the S&P 500) would be healthy, indicating a strong foundation for the equities market.

The Dow Jones industrial average <.DJI> gained 78.26 points, or 0.62 percent, to 12,662.43. The Standard & Poor's 500 Index <.SPX> rose 7.99 points, or 0.60 percent, to 1,343.09. The Nasdaq Composite <.IXIC> added 21.18 points, or 0.75 percent, to 2,835.90.

Earlier, the three major indexes were up more than 1 percent. The S&P is on track to post its worst week since mid March.

A massive sell-off in commodities on Thursday forced investors out of high-risk assets and put into question the equities rally. The Reuters/Jefferies commodities index <.CRB> was down 0.3 percent Friday, extending its 4.9 percent slide from Thursday.

The iShares Silver Trust suffered outflows of more than $1 billion in the week ended Wednesday, its worst one-week outflow ever, plus heavy losses due to the slump in the price of silver.

Commodities and stocks could perhaps move in opposite directions in the future, said Jacobsen. He said a change in leadership from energy and other commodity-related stocks to industrial and transport companies could be expected.

On Friday, industrials <.GSPI> led sector gains on the S&P 500, up almost 1 percent. Ingersoll Rand gained 2.3 percent to $50.39.

Friday marks the one-year anniversary of the flash crash on Wall Street when nearly $1 billion was wiped off the U.S. stock market in a matter of minutes before the market bounced back. The crash is said to have diminished retail investors' confidence in the market.

The CBOE volatility index ., dropped 0.4 percent to 18.12 after closing on Thursday at its highest level since March 28.

(Reporting by Rodrigo Campos; Editing by Kenneth Barry)