US stocks have climbed after a report showed the job market is still revving higher, even with the spectre of a possible trade war hanging over markets around the world.
The better-than-expected news on jobs helped the S&P 500 more than recover all its losses from earlier in the week.
Interest rates and the value of the dollar also rose on expectations that the Federal Reserve got more justification to continue raising interest rates steadily, with its next decision due in about a week and a half.
Beyond the jobs report, stronger-than-expected readings came in on US manufacturing growth and construction spending. They helped turn attention away from the worries about global trade tensions and European politics that had dragged on stocks in recent weeks.
"It's refreshing that some strong economic data today took some focus off the trade rhetoric," said Jon Adams, senior investment strategist at BMO Global Asset Management.
"It's been a banner day for US data overall. You look at the payrolls report, and it's hard to find too much negative in there."
The strong reports raise the likelihood that the Federal Reserve may increase short-term interest rates four times this year, rather than just three.
Higher rates can hurt stock prices, but Mr Adams said investors appear relatively prepared for the possibility "because the Fed is hiking for the right reasons".
The S&P 500 index rose 29.35 points, or 1.1%, to 2,734.62. For the week, it climbed 0.5% after scrambling back from a loss of more than 1% earlier.
The Dow Jones industrial average jumped 219.37, or 0.9% , to 24,635.21, and the Nasdaq composite rose 112.21, or 1.5%, to 7,554.33. The Russell 2000 of small-company stocks rose 14.37, or 0.9%, to 1,647.98.
Twice as many stocks rose as fell on the New York Stock Exchange.
Employers added 223,000 jobs last month, more than economists expected and a pickup from April's hiring rate of 159,000.
Wages for workers also accelerated, with pay up 2.7% from a year ago. That's a bit faster than April's 2.6% wage growth.
President Donald Trump raised eyebrows when he sent out a tweet ahead of the jobs report release that suggested it may be a good one.
Treasury yields and the dollar rose modestly following the tweet, although they had steeper gains after the official release.
As the jobs report typically moves markets, government officials are not supposed to comment on it beforehand.
The encouraging data helped push the yield on the 10-year Treasury note to 2.90% from 2.86% late on Thursday. The two-year yield, whose movements are dictated more by expectations for Fed movement, rose to 2.48% from 2.44%.
A quick beneficiary of higher rates can be the banking industry, which would reap bigger profits from making loans. Financial stocks in the S&P 500 rose 1.1%.
On the flip side were companies that pay big dividends. Higher rates make bonds more attractive to income investors and pull buyers away from dividend-paying stocks.
Utility stocks in the S&P 500 fell 1.5% for the largest loss among the index's 11 sectors.
Another force helping stocks on Friday was relief that politicians in Italy appeared to avoid a scenario that investors had been fearing would hit markets.
Italy's anti-establishment 5-Star Movement and right-wing League succeeded in forming western Europe's first populist government.
It will be headed by a political novice whose first try was rejected four days earlier as too risky for the Italian economy, but the outcome avoids an interim government and a swift return to the polls that investors had feared could end up being a referendum on Italy staying with the euro currency.
In European stock markets, France's CAC 40 rose 1.2%, and Germany's DAX climbed 0.9%. The FTSE 100 rose 0.3%.
In Asia, Japan's Nikkei 225 slipped 0.1%, the Hang Seng in Hong Kong rose 0.1% and the Kospi in South Korea climbed 0.7%.
In commodities markets, benchmark U.S. crude fell 1.23 dollars to settle at 65.81 dollars per barrel. Brent crude, the international standard, lost 77 cents to settle at 76.79 dollars.
Natural gas rose a penny to 2.96 dollars per 1,000 cubic feet, heating oil fell three cents to 2.18 dollars per gallon and wholesale gasoline lost two cents to 2.14 dollars per gallon.
Gold slipped 5.40 dollars to settle at 1,299.30 dollars per ounce, silver dipped two cents to 16.44 dollars per ounce and copper rose three cents to 3.10 dollars per pound.
The dollar rose to 109.51 Japanese yen from 108.64 yen late Thursday. The euro fell to 1.1662 dollars from 1.1685 dollars, and the British pound rose to 1.3346 dollars from 1.3289 dollars.