An unexpectedly strong report on U.S. payrolls helped equities bounce back on Friday from four days of losses, tempering worries that stocks could suffer

the sharp declines seen this week in commodities.

Stocks held strong gains for most of the session but ended the week down more than 1 percent. Speculation that Greece might leave the euro zone late on Friday caused stocks to trim gains and gave investors something to worry about as the strength of the market's rally comes into question.

However, the S&P held above key support levels, indicating the week's retreat could set the stage for further gains in contrast to the tumultuous declines in silver and oil markets.

The stock market is trying to stand on its own feet, said Nick Kalivas, senior equity index analyst at MF Global in Chicago. Corporate news has been pretty strong, and stocks look like they're more attractively valued than commodities.

A massive selloff in materials and oil on Thursday forced investors out of high-risk assets. The iShares Silver Trust suffered its worst week of outflows ever after heavy losses in the metal.

Stocks biggest boost came from the strong U.S. April payrolls report, according to Brian Jacobsen, chief portfolio strategist at Wells Fargo Funds Management in Menomonee Falls, Wisconsin. The data showed an increase of 244,000 jobs, the most in 11 months.

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

People's memory of the Greek crisis last year caused liquidation that is spilling over from currency and commodity markets into the stock market, said Kalivas.

The three major stock indexes were up more than 1 percent through most of the session. Despite Friday's gains, the S&P posted its largest weekly percentage drop since mid-March.

The industrial sector of the S&P 500 <.GSPI>, which could benefit from a slide in commodity prices, was the session's best performer with a 0.77 percent advance.

Fluor Corp , the largest publicly traded U.S. engineering company, was the top percentage gainer on the S&P 500 after it posted a small increase in quarterly profit that beat analysts' estimates. Its shares jumped 7.9 percent to $70.87.

The Dow Jones industrial average <.DJI> gained 54.64 points, or 0.43 percent, to 12,638.81. The Standard & Poor's 500 <.SPX> added 5.10 points, or 0.38 percent, to 1,340.20. The Nasdaq Composite <.IXIC> rose 12.84 points, or 0.46 percent, to 2,827.56.

For the week the Dow lost 1.3 percent, the S&P fell 1.7 percent and the Nasdaq Composite dropped 1.6 percent.

The S&P 500 held above important technical levels with the week's low just below 1,330 and Friday's close above 1,340.

On a weekly basis this 1,330 area is a very good support for stocks, MF Global's Kalivas said.

If you were to work below that, it would question the breakout we saw last week. We're in a battle zone here and next week is going to decide the fate of the market, he said.

Still, the CBOE volatility index . rose 1.1 percent to 18.40, its highest closing level since March 28. The gauge rose 24.7 percent this week, its biggest weekly percentage gain in almost a year. A rise in the VIX means investors will pay more for protection against their equities exposure.

Friday marked the one-year anniversary of Wall Street's flash crash when nearly $1 billion was wiped off U.S. stocks in a matter of minutes before the market bounced back. The crash diminished many investors' confidence in the market.

On Friday about 8.24 billion shares traded on the New York Stock Exchange, NYSE Amex and Nasdaq, below last year's estimated daily average of 8.47 billion but still above the year's daily average so far.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of 2 to 1, while on the Nasdaq, about three stocks rose for every two that fell.

(Reporting by Rodrigo Campos; Editing by Kenneth Barry)