July started on a positive note for U.S. stocks with Wall Street notching its fifth day of gains on Friday after a surprising jump in manufacturing data eased concerns about a tepid economic recovery.

The gains put equities on track for their best week in nearly a year, as the data and a temporary resolution to Greece's debt situation spurred increased demand for riskier assets.

It's been quite a week, that's for sure. The strength just keeps getting better, said Andy Fitzpatrick, director of investments at Hinsdale Associates, in Hinsdale, Illinois. It was positive to see a resolution in Greece and (the strength) could continue into July ... my view is that the outlook is pretty positive.

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.

The Dow Jones industrial average <.DJI> was up 157.30 points, or 1.27 percent, at 12,571.64. The Standard & Poor's 500 Index <.SPX> was up 16.98 points, or 1.29 percent, at 1,337.62. The Nasdaq Composite Index <.IXIC> was up 39.26 points, or 1.42 percent, at 2,812.78.

Friday marks the fifth day of a rally as stocks rebounded from a spate of weakness over the last two months. 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 S&P is up 5.4 percent this week.

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 1.8 percent, led by education firm Apollo Group , which was the S&P's top percentage gainer, up 7 percent at $46.73.

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.4 percent to $13.98 after the U.S. automaker said June sales shot up 14 percent. General Motors was up 0.4 percent at $30.49 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 14.3 percent to $33.07 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 dropped 14.3 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 cell phones.

(Reporting by Ryan Vlastelica; Additional reporting by Ashley Lau; Editing by Jan Paschal)