Just as the world economy appeared to emerge from the uncertainty of the trade war, the spread of the dangerous coronavirus in China has pierced the calm that had settled over financial markets.

The S&P 500 closed down 1.6 percent on Monday — its second straight drop, which wiped out much of the market’s gains since the start of the year, and its sharpest decline since Oct. 2, when the trade war was stoking fears of a domestic slowdown.

President Trump announced the “Phase 1” trade agreement with China on Oct. 11, contributing to weeks of placid trading that pushed stocks to a series of records, making the coronavirus-driven slump all the more jarring.

“There was already reason to question whether markets were a bit too buoyant,” said Patrick Chovanec, chief strategist at the investment advisory firm Silvercrest Asset Management. “Sometimes it takes something like this to refocus their attention on potential downsides.”