For much of the last year, America’s trade war was the rest of the world’s problem.

Even as growth slowed in China, Japan and Germany, the United States economy held up and stocks on Wall Street remained close to records.

Now, investors are facing evidence that tensions between Washington and Beijing are chipping away at America’s factories. That has sent stocks tumbling and raised the stakes for the next round of talks between the leaders of China and the United States, the world’s two largest economies.

The S&P 500 slid on Wednesday for the second straight day, falling 1.8 percent in its worst drop since late August.

Sectors of the market most exposed to the economy — energy, financial and industrial companies — all fell sharply. Technology stocks that have been particularly sensitive to developments in the trade war slumped, as did shares of chemical companies and fertilizer manufacturers. Crude oil prices and yields on government bonds also dropped, reflecting concerns about growth.