Exit greed, enter fear.

After a record-breaking run of buoyant market behavior, investors appeared unnerved on Thursday by a series of provocative remarks by President Trump and increasing tensions with North Korea.

The tech-heavy Nasdaq 100 index closed the day down 2.13 percent, and the broader Standard & Poor’s 500-stock index fell by 1.45 percent as investors sold out of such high-flying stocks as Amazon, Facebook and Netflix. It was the sharpest daily decline in the benchmark S.&P. 500 since May 17.

Gold held at $1,283.70 an ounce after its strong run of late, and the Nikkei 225 index in Japan steadied from its fall on Wednesday, closing at 19,730. The relative safety of United States Treasury securities continued to appeal, with the yield on the 10-year note falling to 2.20 percent from 2.25 percent on Wednesday. (Yields and prices move in opposite directions from each other.)

At the root of investors’ nervousness was a jump in the VIX, the Chicago Board Options Exchange Volatility Index. Known as Wall Street’s fear gauge, the index measures investor expectations that stocks will experience sharp moves in the future.