Stocks climbed Friday after the government said hiring grew at a stronger pace in June. Technology and consumer-focused companies led the way as investors were glad to see a positive sign for the economy.

The Labor Department said American employers added 222,000 jobs last month. That was more than analysts had expected, and it came just a day after a survey that showed weaker job creation by private companies.

Stocks regained much of the ground they lost Thursday. Technology companies jumped and retailers like Amazon and McDonald’s traded higher.

Bond yields climbed and the dollar got stronger. Gold fell.

“The data itself shows a pretty strong labor market,” said Sean Lynch, co-head of global equity strategy for the Wells Fargo Investment Institute. He said it “probably lays to rest some of the worries (that) we were taking a step back from an economic standpoint.”

The Standard & Poor’s 500 index picked up 15.43 points, or 0.6 percent, to 2,425.18. The Dow Jones industrial average gained 94.30 points, or 0.4 percent, to 21,414.34. It fell 158 points a day earlier.

The Nasdaq composite rose 63.61 points, or 1 percent, to 6,153.08.

advertisement | advertise on newsday

The Russell 2000 index of smaller-company stocks added 15.02 points, or 1.1 percent, to 1,415.84