By Alexander Osipovich and Anna Isaac

Stocks rose Monday as investors embraced signs that global factory activity was on a path toward recovery and largely shrugged off the violent clashes in U.S. cities.

The Dow Jones Industrial Average climbed 100 points, or 0.4%, in afternoon trading. The S&P 500 was up 0.5%, while the Nasdaq Composite gained 0.7%. Overseas, major European and Asian indexes posted gains.

Data from surveys of purchasing manufacturers indicated that factories in the U.S. and abroad continued to reduce output last month, but the pace of deterioration slowed as governments eased coronavirus-related restrictions. In China -- the first country to impose sweeping lockdowns to combat the virus -- factories reported an increase of activity, offering investors hope that other countries would follow.

In the U.S., the Institute for Supply Management's manufacturing index for May rose to 43.1 from an 11-year low of 41.5 in April. A reading above 50.0 indicates an increase in activity, while a reading below that level indicates a decrease.

"The hope is that what we've seen with China is playing out in Europe, and there will eventually be follow-through in the U.S. once the virus is under containment," said Jeffrey Kleintop, chief global investment strategist at Charles Schwab.

Investors largely seemed to discount the clashes between police and civilians in the U.S. as the worst civil unrest in decades erupted in American cities this weekend.

"Markets are assuming it won't last. We've seen this all before, going back to the civil protests in the 1960s," said Ian Shepherdson, chief economist at Pantheon Macroeconomics. "If cities go on to be closed down due to curfews and so on, then that would be disastrous for companies trying to reopen. Too soon to tell."

Ten of the 11 sectors of the S&P 500 were up on Monday, with real estate, energy and financials among the best performers. Only health care was negative.

Drugmaker Pfizer fell 6.8%, weighing on the Dow. The company said late Friday that it would stop a study of a potential breast cancer treatment. Another drugmaker, Gilead Sciences, slid 2.8% after it reported mixed results from the latest trial of a Covid-19 treatment it is developing.

Shares of Target fell 2.2% after the Minneapolis-based retailer closed or cut hours for more than 200 stores over the weekend due to the unrest.

Gun stocks jumped as protests and violence dominated the headlines. Smith & Wesson Brands soared 16%, while Sturm, Ruger & Co. was up 9%.

In bond markets, the yield on the 10-year U.S. Treasury ticked up to 0.671%, from 0.650% Friday.

Investors continued to monitor tensions between the U.S. and China, which have feuded in recent weeks over Beijing's handling of the coronavirus and its crackdown on Hong Kong. Bloomberg News reported Monday that China has ordered companies to temporarily halt imports of some U.S. farm goods including soybeans.

Such a move could add to the friction between the world's two largest economies. A U.S.-China trade war roiled markets for much of 2019 and ended only after both sides agreed to a Phase One trade deal.

"If it is true China will buy less soybeans, it will increase the chances of escalation with the U.S.," said Seema Shah, chief strategist at Principal Global Investors. Such a move would suggest that "China is predicting the upcoming U.S. election means that President Trump's bark will be worse than his bite."

Mr. Trump blasted Beijing on Friday for "absolutely smothering Hong Kong freedoms," but he stopped short of announcing specific actions in response and he left the Phase One trade deal in place, to the relief of investors. Hong Kong's benchmark stock index surged 3.4% on Monday.

In Europe, the pan-continental Stoxx Europe 600 climbed 1.1%. Shares of Associated British Foods, owner of clothing retailer Primark, rallied 8% after it said it would be opening stores in coming weeks in response to loosening government lockdowns.

Xie Yu contributed to this article.

Write to Alexander Osipovich at alexander.osipovich@dowjones.com and Anna Isaac at anna.isaac@wsj.com