Stocks closed broadly higher after solid gains in hiring last month allayed some of investors’ concerns that the economy was slowing down and more in Friday’s Stock Market Update.

The broad gains Friday erased nearly all of the significant losses the market suffered earlier in the week brought on by dismal news on U.S. manufacturing and service industries.

The jobs report gave traders some reassurance after a rough week dominated by surprisingly weak numbers on U.S. manufacturing and services activity, which raised recession worries and sent the S&P 500 to its first back-to-back losses of 1% this year.

Employers added 136,000 jobs last month, slightly less than the 145,000 that economists were expecting and below the 168,000 pace from August, a fresh sign that job growth is solid but slowing. Worker’s wages were also weaker than expected, with zero growth from a month before. On the encouraging side, the government said hiring in prior months was stronger than earlier estimated, and the unemployment rate dropped to 3.5% from 3.7%.

“While the bears may take this as a further confirmation of a slower economy, it is actually a pretty strong read, especially when you factor in previous revisions” said Mike Loewengart, vice president of investment strategy at E-Trade Financial.

If the job market can remain strong, it would allow U.S. households to keep spending. And that spending strength has been the hero for the economy recently, propping it up when slowing growth abroad poses a threat and President Donald Trump’s trade war with China saps exports and manufacturing.

Stock markets around the world rose following the release of the report, and gold dipped as investors felt less need for safety.

Technology, health care, financial and communication services stocks accounted for much of the market’s gains. Visa rose 1.7%, UnitedHealth Group gained 2%, Citigroup added 2.1% and Google parent Alphabet was up 1.8%.

The energy sector was essentially flat after declining for much of the day.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 rose 41 points, or 1.4%, to 2,952. It still ended the week down 0.3%, its third straight weekly drop. The Dow Jones Industrial Average rose 372 points, or 1.4%, to 26,573. The Nasdaq added 110 points, also 1.4%, to 7,982.

Major European stock indexes also rose.

ECONOMIC CHECK: Anticipation built through the week for Friday’s jobs report as a parade of weak data on the economy shook markets around the world. U.S. manufacturing activity contracted last month at its sharpest pace in a decade, and growth in the nation’s services sector slowed.

Friday’s mixed report shows a jobs market that is slowing but still growing, and economists said it could signal that a rate cut at the Federal Reserve’s meeting later this month is no longer a slam dunk. The Fed has already cut rates twice this year to shield the economy from the effects of slowing growth abroad and the U.S.-China trade war.

The yield on the 10-year Treasury dipped to 1.52% from 1.53% late Thursday. The two-year yield, which moves more on expectations about Fed activity, rose to 1.40% from 1.37%.

FINE CHINA: The world’s two largest economies are set to talk again next week about trade. Markets have been quick to swing on any hint of movement in their dispute, which has dragged on manufacturing around the world and pushed CEOs to delay investments given all the uncertainty.

Trump said Friday that his call for China to investigate former Vice President Joe Biden will have no bearing on the upcoming talks. He also said he believes China wants to make a deal.

“What market participants will be looking for is really what is the next trajectory?” said Bill Northey, senior investment director at U.S. Bank Wealth Management. “Is it getting worse? Is it getting better? Is it status quo?”

The odds of Washington and Beijing hammering out a substantive deal in the near term are very low, Northey said.

“An agreement to continue to negotiate toward a mutually acceptable future endpoint is really what would be viewed as a success,” he added.

SHINED UP: Apple helped drive the market higher after rising 2.8%. A Japanese newspaper, Nikkei, said that the company asked suppliers to boost production of its iPhone 11.

Moves in Apple’s stock have an outsized effect on the S&P 500 because it’s the second-largest constituent in the index by market size.

REBOOTING: HP slumped 9.5% after the maker of personal computers and printers announced jobs cuts of up to 16% of the company’s payroll.

COMMODITIES: Crude oil recovered from an early slide to close with a modest gain. Still, it ended the week with a loss of nearly 6% as traders worried about weakening demand and growing supplies.

Gold edged lower, falling to $1,510.20 per ounce.

© The Associated Press. All rights reserved.