The United States added 128,000 jobs in October as the jobless rate ticked up to 3.6 percent, outperforming analyst forecasts during a month in which one of the largest private-employer strikes in recent years weighed on the economy.

The number was below recent averages but signaled that the labor market remains resilient and healthy 11 years into the economic expansion. The Standard & Poor’s 500 and Nasdaq stock indexes closed at record highs amid growing signs that recession fears several months ago might have been overblown.

The new data was somewhat skewed because of a General Motors strike, in which 46,000 workers shut down production for six weeks at the automaker, causing layoffs from Canada to Mexico in related industries, and sent unemployment claims in states such as Michigan surging.

“For now, we can take solace that there are sufficient job and wage gains to support the economy and keep it miles away from any recession,” Joseph Brusuelas, the chief economist at the tax and consulting firm RSM, said in an interview.

The jobs data lifted two Wall Street indexes to record levels. The S&P 500 stock index rose 1 percent to 3,067, and the Nasdaq rose 1.1 percent to 8,386. The Dow Jones Industrial Average closed near a record, rising more than 300 points.

The Bureau of Labor Statistics, which released the report, noted the effects of the GM strike. The number of workers in auto and parts manufacturing declined by 42,000. Federal employment decreased by about 17,000, as temporary workers engaged in the 2020 Census completed their work.

Brusuelas said that those numbers indicated that the economy would have generated about 187,000 jobs in October if not for the strike and Census completions, besting the monthly average of about 167,000 for the year.

“For forward-looking policymakers and investors, that would be the number you want to hang your hat on going forward,” he said in an interview. “That implies strong spending going forward, which will prevent the economy from entering a downturn anytime soon.”

Daniel Zhao, a senior economist at Glassdoor, agreed.

“If not for the strike, the report would have been a blockbuster,” he said.

The Bureau of Labor Statistics also revised the monthly job total from August and September upward, to a net of 95,000 more jobs.

The positive jobs report came two days after the Commerce Department issued data showing that the economy had slowed from July through September, in part because of a contraction in business investment. The Federal Reserve lowered interest rates this week for the third time this year in an effort to boost the economy and insulate it from the downward drag of the trade war and weakening growth abroad.

The job news was coupled Friday with the release of the Institute for Supply Management’s index for October, a closely watched gauge that indicated a contraction in the manufacturing sector for the third straight month.

The slowing but positive growth, weaker business investment, and resilient labor market paint a picture of an economy that has decelerated a bit from 2018′s strength but doesn’t appear close to dipping into a recession, despite fears that were sparked several months ago.

The jobs gains in October came primarily in industries such as health care and social assistance, which added 34,000 jobs, and leisure and hospitality industry, which added 61,000.

Wage growth has remained stubborn at around 3 percent, puzzling economists who don’t understand why it has failed to rise more dramatically as the job market has tightened.

President Trump, who is staking his reelection campaign in part on the growth the economy has recorded in recent years, cheered the jobs report.

“Wow, a blowout JOBS number just out,” he wrote. “This is far greater than expectations. USA ROCKS!”

Larry Kudlow, the director of the National Economic Council, spoke glowingly of the numbers to Bloomberg News.

“Don’t write off the economy just yet,” he said. “It’s got a lot of fundamental strength.”

David Berson, the chief economist at Nationwide Insurance, said it is getting harder and harder for employers to find workers. He forecast that wage growth would grow stronger if the unemployment rate sinks further.

“We’re in the 11th year of an economic expansion, and this is the longest ever, we’re starting to slowly run out of workers,” he said. “There simply aren’t as many out there. The low-hanging fruit of employers finding people to work for them has all been picked."

Heather Long contributed to this report.

Read more: