The stock market, it's often said, doesn't like uncertainty. House Majority Leader Eric Cantor's primary defeat to tea party activist David Brat certainly rattled investors heading into midterm elections.
In the wake of his stunning loss, Cantor, the second-ranking Republican in the House, plans to step down from his post as majority leader, sources told NBC News.
Read MoreWell, there had been less uncertainty in DC
"With the defeat of this very safe incumbent, investors have to wrestle with the unanticipated possibility that not only might the Republicans fail to achieve plurality in the Senate, but also their majority in the House could be threatened," said Sam Stovall, managing director, U.S. equity strategy at S&P Capital IQ.
"It does remind us that politics can surprise you. A little bit of why the market had a pullback today is tied to Cantor's loss here," said Jeffrey Kleintop, chief market strategist at LPL Financial.
The seven-term Republican's defeat Tuesday in Virginia's 7th Congressional District rattled Wall Street on Wednesday, with the Dow Jones Industrial Average falling as much as 124 points.
Boeing led blue-chip losses, with Bloomberg citing a Guggenheim Securities analyst as saying the plane manufacturer was the "biggest loser" besides Cantor in the Virginia primary because the Republican's defeat jeopardizes congressional reauthorization of low-cost lending that helps foreign carriers purchase jets.
The market in recent years "had to contend with price shocks related to the actions of a dysfunctional Congress. This year, Congress has laid low by playing nice, passing the budget and raising the debt ceiling. We didn't think investors' fireworks would come from Washington," Stovall said.
"People have been saying there is nothing for us to worry about. Well, maybe this is something now that could cause us to worry between now and mid-November," said Stovall, who adds that Cantor's defeat is "another example of why midterm election years are the most vulnerable or uncertain for equity markets."
Major U.S. Indexes
Historically, the worst two quarters of the 16-quarter presidential cycle are the second and third quarters of midterm election years, "because of the uncertainty leading up to the elections," Stovall said.
That said, Wall Street tends to worry about things right up until they become a fact, or "once the possibility becomes a reality. That's why the three quarters after elections—so the fourth quarter of the year and the first and second of the next—are the three strongest quarters of the 16-quarter presidential cycle," the strategist added.
—By CNBC's Kate Gibson