Shares of Tesla and SpaceX fell Wednesday after Democrats swept the midterm elections, defeating candidates backed by Elon Musk despite at least $474 million in political spending by the billionaire and raising the prospect of tougher scrutiny of his businesses.

SpaceX shares were down more than 6% and Tesla declined 4.66% at 9:27 a.m. Eastern, before the regular U.S. trading session. Broader technology stocks also came under pressure as Democrats secured control of Congress.

"Guess my election-interfering space lasers didn't work this time," Musk wrote on X early Wednesday.

Nearly half of Musk's election spending-$224 million-went into Texas, according to CNBC's analysis of campaign-finance records. Republican Senate nominee Ken Paxton lost to Democrat James Talarico, while Democratic challenger Gina Hinojosa defeated Gov. Greg Abbott.

Those results create potential obstacles in a state central to Musk's operations. Tesla runs its largest American vehicle factory outside Austin, while SpaceX launches rockets from Starbase in South Texas. Both companies moved their headquarters from California to Texas within the past five years.

Talarico, the first Democrat to win a Texas U.S. Senate election in more than three decades, made opposition to Musk's influence a campaign theme. He advocated tighter regulation and the repeal of tax breaks for data centers and other AI infrastructure.

"We must get big money out of our politics, so no billionaire or trillionaire can buy our elections," Talarico said in his victory speech. "We must unrig this economic system that only benefits the top 1%."

Hinojosa has proposed a moratorium on new data centers, eliminating industry tax breaks and requiring developers to cover their full electricity costs. Those policies could affect businesses dependent on large amounts of power, water and publicly supported infrastructure.

Republicans retained control of the Texas Legislature, limiting her ability to enact sweeping changes. Her administration could nevertheless take a tougher approach to permitting and business incentives.

Musk's losses extended well beyond Texas. America PAC spent nearly $87 million across 44 federal contests, according to CNBC's review of Federal Election Commission filings. By Wednesday morning, its Republican candidates had lost 29 races and won three, with 12 undecided.

More than $80 million, or 93% of that spending, went toward races Republicans lost.

Democratic control of Congress could bring investigations into Musk's federal contracts, his former leadership of the Department of Government Efficiency and his companies' dealings with Washington. President Donald Trump retains authority over executive agencies and veto power, constraining Democrats' ability to reverse administration policies.

The election also demonstrated opposition to data-center expansion beyond Musk's businesses. Campaigns and outside groups spent $173 million on data-center advertising during the general election, almost entirely negative, according to AdImpact. Democratic advertisers accounted for $140 million.

Voters considered 41 local data-center measures, with at least 10 communities approving bans or restrictions. Winning Senate candidates Sherrod Brown in Ohio and Annie Andrews in South Carolina also campaigned against aspects of the industry's expansion.

JPMorgan Asset Management estimates that AI infrastructure investment could reach roughly $5 trillion through 2030, including about $2 trillion financed through investment-grade debt markets. Delayed permits could postpone project revenue, while higher electricity and financing costs could erode anticipated returns.