Quashing worries that job growth is flagging, the government on Friday reported that employers increased payrolls by 287,000 in June, an arresting surge that could reframe the economic debate just weeks before Republicans and Democrats gather for their conventions.

The official unemployment rate did rise to 4.9 percent, from 4.7 percent, but that was largely because more Americans rejoined the work force. And average hourly earnings ticked up again, continuing a pattern of rising wages that brought the yearly gain to 2.6 percent.

“Wow, this one takes my breath away,” said Diane Swonk, an independent economist in Chicago.

An unexpectedly grim employment report in May combined with Britain’s vote to leave the European Union had fanned wider concerns that the American economy was in danger of stalling. During its meeting last month, the Federal Reserve unanimously decided to postpone increasing the benchmark interest rate.

But the latest Labor Department report, Ms. Swonk said, gives the Fed “a cushion” to consider a bump in rates later this year.