In one of the biggest US political upsets in recent times, the Majority Leader in the House of Representatives, Eric Cantor, has lost the Republican primary in Virginia.

Mr Cantor, the second most powerful Republican in the House, lost the election to Tea Party-aligned challenger Dave Brat, a college economics professor.

A relative political newcomer, Mr Brat is now the Republican nominee for the House elections in the 7th district of Virginia at the mid-term elections in November.

The result could halt efforts to craft a House immigration reform bill, as Republicans seek to protect themselves against future challenges from the right ahead of the 4 November mid-term elections.

It could also make Republicans even more hesitant to co-operate with President Barack Obama and Democrats for fear of being labelled compromisers.

Mr Cantor had been seen by many as an eventual successor to House Speaker John Boehner, and his defeat will mean a shake-up in the Republican leadership at the end of the year among House members nervous about the depth of public anger toward Congress.

A seven-term congressman with ties to the financial industry, Mr Cantor, 49, had spent more than $5m to head off the challenge from Mr Brat, who teaches at Randolph-Macon College.

Mr Brat spent only about $122,000, according to the Center for Responsive Politics, and was not seen in media or national Republican circles as a danger to Mr Cantor.

The victory also emboldened conservative leaders and could encourage a challenge to Mr Boehner when the new leadership team is chosen.

With nearly all precincts reporting, Mr Brat had about 56% of the vote to Mr Cantor's 44%.

Mr Cantor told supporters. "I know there are a lot of long faces here tonight. It's disappointing, sure."

Speaking to an ecstatic crowd, Mr Brat said: "This is the happiest moment, obviously, of my life."