Technology stocks suffered steep losses Thursday as investors reassessed the outlook for artificial intelligence following sweeping Democratic victories in national midterm elections and state races. Fears of a crackdown by the incoming Democratic Congress drove the tech-heavy Nasdaq down more than 5%, erasing more than $2 trillion in market value. The Dow Jones and S&P also declined.

The selloff came two days after the elections and reversed the market's initial response. On Wednesday, shares had risen broadly as investors welcomed a clear outcome in the contest for control of Congress. By Thursday, that relief had given way to concern about what the results could mean for companies investing heavily in AI.

A central issue was voter resistance to the expansion of AI data centers. Many voters, worried about the projects' demands on water and energy supplies, backed Democrats who promised to challenge their proliferation. That opposition poses a problem for companies including Meta and Google parent Alphabet, which need additional data centers to continue developing the technology.

Technology shares were already having a difficult year before Thursday's decline. Investors have increasingly questioned how soon the enormous sums committed to AI will generate returns. David Busch, chief investment officer of Trajan Wealth, said concerns included the possibility of substantially more regulation of AI technology and resistance to data center construction across the country.

Companies connected to AI or dependent on it were among Thursday's hardest-hit stocks. Tesla and SpaceX, both controlled by billionaire Elon Musk, fell particularly sharply. Musk spent hundreds of millions of dollars trying unsuccessfully to help elect more Republicans. Investors now fear that he and his businesses could face Democratic scrutiny after the new Congress takes office in January.

The potential obstacles extend beyond Washington. Democrats who campaigned on slowing AI development also won state-level contests. Among the most prominent victories was Gina Hinojosa's win in the Texas governor's race.

Whether the losses will persist or spread further beyond technology remains uncertain. AI has become a major contributor to the U.S. economy, helping it achieve annual growth of 3.4% in the July-September quarter.

A prolonged downturn would also reach investors outside Wall Street's professional ranks. Many Americans hold shares in AI companies through retirement investments, including 401(k) accounts and pension funds, exposing those portfolios to further losses.