Stocks started July with a bang on Friday with Wall Street scoring its best week in two years on strong manufacturing data that eased concerns about slowing growth.

The data spurred the rally into a fifth straight day, even as continued light trading volume called into question the sustainability of the gains.

Investors were growing more optimistic a day after a temporary resolution to Greece's debt situation. The S&P 500 <.SPX> climbed further above resistance at its 50-day moving average at 1,317, establishing another floor in the market after the benchmark index moved above a number of technical resistance levels.

The magnitude of today's move is undoubtedly due to the light volume, said John Norris, managing director of wealth management with Oakworth Capital Bank in Birmingham, Alabama. We'll take positive movement, however we can get it, but the gains could prove somewhat illusory.

Volume was light, with 6.2 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, well below the year's daily average of 7.55 billion.

The day's advance was broad, with about five stocks rising for every one that fell on the New York Stock Exchange. On the Nasdaq, nearly three stocks rose for every one that fell.

The pace of growth in manufacturing picked up for the first time in four months, with an index of national factory activity rising to 55.3 in June from 53.5 in May, Institute for Supply Management (ISM) data showed.

The ISM survey built on surprisingly strong regional business data on Thursday, reversing a recent trend of weaker-than-expected data.

Norris said that while the data was encouraging, next week's ISM non-manufacturing survey would prove more important for investors.

This news is great, but manufacturing is such a small segment of the economy that this doesn't mean too much for GDP, he said.

The Dow Jones industrial average <.DJI> was up 168.43 points, or 1.36 percent, at 12,582.77. The Standard & Poor's 500 Index <.SPX> was up 19.03 points, or 1.44 percent, at 1,339.67. The Nasdaq Composite Index <.IXIC> was up 42.51 points, or 1.53 percent, at 2,816.03.

The S&P rose 5.6 percent for the week, while the Dow gained 5.4 percent and the Nasdaq added 6.2 percent. For all three indexes, it was their biggest weekly percentage gain since July 2009.

Consumer discretionary stocks led the day's advance but trading volume was well below average ahead of the long Fourth of July holiday weekend. The S&P consumer discretionary sector index<.GSPD> gained 2 percent, led by education firm Apollo Group , which was one of the S&P's top percentage gainers, up 6.4 percent at $46.47.

Late Thursday, Apollo said it believes all of its academic programs meet the standards set by the key education rule.

Investors focused on the U.S. data, even as the latest overseas data was sobering. Outside the United States, the global manufacturing sector lost steam for a second month running, surveys showed.

Ford Motor rose 1.7 percent to $14.02 after the automaker said June sales shot up 14 percent. General Motors was up 0.7 percent at $30.58 after the company reported a weaker-than-expected gain in June U.S. sales. But the company sees that tepid growth as temporary, GM's U.S. sales chief Don Johnson told reporters.

Oshkosh Corp surged 13.9 percent to $32.95 after Carl Icahn said he wanted to meet with the management of the specialty truck maker to discuss enhancing shareholder value. The billionaire investor owned about 9.5 percent of Oshkosh shares as of June 20.

On the downside, Eastman Kodak Co lost 14.2 percent to $3.07 after a U.S. trade panel upheld portions of a ruling unfavorable to the company in a patent fight over digital camera technology in cellphones.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)