U.S. stocks rebounded from early losses to close higher on Friday as investors viewed the day's jobs data as less disappointing than first thought.

Materials, industrials and discretionary shares were among the day's biggest gainers, with the S&P materials index up 0.8 percent and gold gaining for the day.

In the Labor Department report, nonfarm payrolls increased less than economists expected, and April's job gains were the smallest since September.

But the report also had some upbeat news, with both average hourly earnings and the average work week rising, and analysts said the overall slowdown in hiring may temper expectations for U.S. interest rate hikes.

"I know there was a knee-jerk reaction where the equity market went down, but it didn't take long for cooler heads to prevail and recognize this is still a reasonably good number," said Eric Kuby, chief investment officer, North Star Investment Management Corp in Chicago.

"The economy is still OK, but there are no pressures (that) maybe a rate increase is on the table earlier."

A Reuters survey following the jobs report showed Wall Street's top banks have all but abandoned any expectation that the Federal Reserve will raise rates in June. Most now see the U.S. central bank's next rate hike coming in September.

The Dow Jones industrial average ended up 79.92 points, or 0.45 percent, to 17,740.63, the S&P 500 gained 6.51 points, or 0.32 percent, to 2,057.14 and the Nasdaq Composite added 19.06 points, or 0.4 percent, to 4,736.16.

Mixed economic data and slowing global growth have weakened investors' appetite for risk this week.

The Dow and S&P 500 posted a second straight week of losses, their first two weeks of declines since February, while the Nasdaq registered a third straight week of losses. For the week, the Dow ended down 0.2 percent, the S&P 500 fell 0.4 percent and the Nasdaq declined 0.8 percent. The S&P 500 is up 0.6 percent for the year so far.

The healthcare sector had among the day's biggest declines, with Endo International slumping 39.2 percent to $16.17 after the drugmaker slashed its 2016 revenue and profit forecasts.

The Nasdaq biotech index dropped 1.3 percent, while the S&P health sector was down 0.6 percent.

Also, shares of Square Inc (SQ.N), the mobile payments company, fell 21.7 percent to $10.22, a day after it reported a bigger-than-expected quarterly loss.

The stock market could get a boost from consumer names reporting next week. With first-quarter earnings near an end, consumer discretionary components are the only sector showing double-digit earnings growth from a year ago.

About 7.1 billion shares changed hands on U.S. exchanges, compared with the 7.2 billion daily average for the past 20 trading days, according to Thomson Reuters data.

Advancing issues outnumbered declining ones on the NYSE by 1,922 to 1,051; on the Nasdaq, 1,538 issues rose and 1,248 fell.

The S&P 500 posted 16 new 52-week highs and 12 new lows; the Nasdaq recorded 32 new highs and 82 new lows.