A dramatic selloff in chip stocks drove the Nasdaq Composite to its worst day in a year and a half, as investors digested the potential for the midterm election results to curtail artificial-intelligence momentum.

Shares of Sandisk SNDK closed down 22% on Thursday, making them the worst performer in the S&P 500 SPX. Shares of Advanced Micro Devices AMD, Micron Technology MU and Western Digital WDC all lost more than 17%, while Seagate Technology Holdings STX shed 16% and chip giant Nvidia’s stock NVDA ended down 9%.