After weeks of relative calm and record highs, stocks in the United States fell Tuesday for the third straight day after President Trump’s comments on his China trade war rattled investors and revived some of the market volatility that has become a signature of the dispute between the world’s two largest economies.

Speaking in London, where he was attending a NATO meeting, Mr. Trump hinted that he was ready to wait until after the 2020 election to come to terms with China. During a wide-ranging appearance with Jens Stoltenberg , the NATO secretary general, Mr. Trump tamped down hopes that an agreement would be struck before the end of the year, telling reporters: “I have no deadline, no.”

On Wall Street, the remarks sent stocks lower. After falling more than 1 percent in early trading, the S&P 500 recovered a bit to finish the day down 0.7 percent.

The biggest drop was in energy shares, which are sensitive to the outlook for both the trade war and the slowdown in the global economy. Benchmark prices for American crude oil rose 0.3 percent to $56.10 a barrel.