Updated

House GOP Leader Eric Cantor's primary loss has sent shockwaves through Capitol Hill, with sources warning that the historic upset could have a "destabilizing" effect on party leadership and sideline key legislation.

"Everybody is just in shock right now," Rep. Lynn Westmoreland, R-Ga., said.

Cantor, a seven-term Virginia congressman, was defeated in Tuesday's primary by Dave Brat, a little-known economics professor with Tea Party backing. He won in part by hammering Cantor over immigration, accusing him of supporting "amnesty" for illegal immigrants.

That strategy immediately raises questions about the fate of immigration legislation in Congress. GOP leaders had been giving conflicting signals over whether they would try to advance some version of what the Senate passed, perhaps after the primaries.

But Cantor's loss could send immigration talks into a deep freeze. Opponents of the proposed legislation pointed to Brat's victory as a lesson to other members.

"The wage-earning voters of Rep. Cantor's district apparently felt abandoned by his immigration positions that virtually ignored their anxiety about stagnant wages and high unemployment and that projected primary concern for unlawful foreign visitors and employers seeking more foreign workers," NumbersUSA President Roy Beck said in a statement.

Democrats hoping for an immigration deal this year were evidently nervous about Cantor's loss. White House adviser Dan Pfeiffer offered this assurance on Twitter: "Cantor's problem wasn't his position on immigration reform, it was his lack of a position." He noted that Sen. Lindsey Graham, R-S.C., "wrote and passed a bill and is winning big."

Asked Wednesday if she thought Cantor's loss means immigration legislation is dead, House Democratic Leader Nancy Pelosi claimed she never thought of Cantor as an advocate for that legislation.

Regardless of the impact on the immigration debate, Cantor's loss potentially opens up a leadership crisis.

The primary loss for a sitting majority leader is unprecedented. It's unclear whether Cantor will even serve the remainder of his term.

One senior aide to House Speaker John Boehner said they were "absolutely stunned." Asked if Cantor should step aside, the aide said they'll get an idea from members on Wednesday.

The aide added: "The last thing we need is a leadership scramble up here as we head into the midterms."

Though Cantor's loss caught party leaders and rank-and-file by surprise, it swiftly sets up jockeying for key posts.

GOP sources said Rep. Steve Scalise, R-La., head of the conservative Republican Study Committee, is interested in the position of Republican whip, a post currently held by Rep. Kevin McCarthy, R-Calif., who could now be next in line for Cantor's job -- unless conservatives in the caucus try to move against McCarthy.

There are also questions over what this means for Boehner and his hold on the speaker's gavel. The conventional wisdom is that this makes Boehner stronger because there's no one to challenge him as Cantor was believed to be the heir apparent. One former senior House Republican close to Boehner described this as "devastating to the party," while adding that it may not be to Boehner "as there is no one else now."

"We need Boehner now more than ever," said the former member. "Can Boehner step up?"

Democrats were quick to gloat about Cantor's defeat, while playing up the supposed influence of the Tea Party.

Brat, speaking with Fox News, said he enjoyed Tea Party support but was a candidate focused on Republican principles including free markets and "adherence to the Constitution."

In the short-term, though, the upset could derail legislative work on Capitol Hill.

One source said Cantor and others were "playing with fire" and that Tuesday's race "will force the Republicans to move further to the right."

"You have what could be chaos for leadership. They could get caught up in the politics of this and that gets them away from any legislative agenda," the source said.

Fox News' Chad Pergram contributed to this report.