Updated

House Majority Leader Eric Cantor lost his GOP Virginia primary race to Tea Party-backed challenger Dave Brat Tuesday night in a stunning upset.

Brat, an economics professor and political novice, latched onto the hot-button issue of immigration, accusing Cantor, the No. 2 Republican in the GOP-led House, of supporting immigration legislation that would give “amnesty” to millions of people living illegally in the United States.

“If you go knocking door to door, you’ll know the American people think they’re in trouble,” Brat told Fox News. “It was a miracle. God gave us this win.”

Brat, a Princeton graduate and seminar student who teaches at Randolph-Macon College, a small liberal arts school north of Richmond, attempted to downplay the Tea Party vs. Washington establishment narrative about the race.

He said he enjoyed Tea Party support but was a candidate focused on Republican principles including free markets and “adherence to the Constitution.”

Cantor conceded defeat about an hour after the race was called, confirming the biggest upset victory of this year's election cycle and a major blow to the core of the GOP.

“It’s disappointing,” he told a small crowd in Richmond. “But I believe in this country. I believe there is opportunity around the next corner.”

Cantor also thanked volunteers, supporters and campaign staffers. And he called serving as the state’s 7th District congressman and as majority leader one of the highest honors of his life.

Brat won 56 percent of the vote, compared with 44 percent for Cantor, with all precincts reporting. Approximately 18,000 more votes were cast in Tuesday's primary than in 2012, when Cantor easily defeated another Tea Party-backed challenger, Floyd Bayne.

In the closing weeks of the race, Brat tried to tie the seven-term congressman’s support for legal status for children who have illegally entered the country to the situation of hundreds of children from Central America pouring illegally across the southern U.S. border, creating a humanitarian crisis.

Cantor, once considered next in line to take over for House Speaker John Boehner, R-Ohio, fought back in part by pointing out that he helped block Senate plans "to give illegal aliens amnesty."

Cantor and other House Republican leaders had advocated a more step-by-step approach to immigration reform that would in part begin with tighter border security, instead of the comprehensive bill backed by the Senate.

Brat also said Cantor, who was first elected in 2000 and has ties to Tea Party-backed lawmakers in Congress, had spent too much time in Washington and lost touch with the conservative base in his Richmond-area district.

Despite the attacks, Cantor had appeared well positioned for reelection.

The most recent campaign finance reports showed he spent more than $1 million in April and May but still has more than $1.5 million in the bank.

Brat, by contrast, raised just more than $200,000 for his campaign, according to the reports.

"Dollars don't vote, people do," he told Fox News.

Large corporations and other groups donated heavily to the incumbent.

The American Chemistry Council, whose members include many blue chip companies, spent more than $300,000 on TV ads promoting Cantor. And the political arms of the American College of Radiology, the National Rifle Association and the National Association of Realtors had five-figure independent spending to promote him.

Brat helped offset the cash disadvantage with endorsements from conservative activists, like radio host Laura Ingraham, and with help from Tea Party activists angry at Cantor.

The upset sent shock waves across Capitol Hill with speculation about whether Cantor would resign his leadership post and if any Republican incumbent would now dare to support immigration reform. Cantor aides did not respond Tuesday when asked if the 51-year-old would launch a write-in campaign in November.

“Eric Cantor and I have been through a lot together," Boehner said. "He’s a good friend and a great leader, and someone I’ve come to rely upon on a daily basis as we make the tough choices that come with governing. My thoughts are with him and (wife) Diana and their kids tonight.”

Soon after Cantor conceded, questions also began to arise about what the result means for Boehner's future as speaker. The conventional wisdom is that Boehner has been strengthened by Cantor's defeat, as his strongest potential challenger for the speaker's gavel has been removed.

One former senior House Republican close to Boehner described Cantor's loss as "devastating to the party," before 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 reveled in the loss.

"From Day One of (President) Obama’s presidency, Eric Cantor has used every dirty trick to block the Democratic agenda," the Democratic Congressional Campaign Committee said in a fundraising email.

"Eric Cantor has long been the face of House Republicans' extreme policies, debilitating dysfunction and manufactured crises.  Tonight is a major victory for the tea party as they yet again pull the Republican Party further to the radical right," said House Minority Leader Nancy Pelosi, D-Calif. "As far as the midterm elections are concerned, it's a whole new ballgame."

Cantor, a former Virginia state legislator, was elected to Congress in 2000. He became majority leader in 2011.

The Brat victory was by far the biggest of the 2014 campaign season for Tea Party forces, though last week they forced veteran Mississippi Sen. Thad Cochran into a June 24 runoff with state Sen. Chris McDaniel.

"Thad Cochran, Eric Cantor. They were playing with fire," a source familiar with both campaigns told Fox News. "It 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."

Cantor's defeat appears to be the first ever suffered in a primary by a sitting House majority leader. Former House Speaker Thomas Foley, D-Wash. and Senate Democratic leader Tom Daschle of South Dakota both lost their seats at the polls in 1994 and 2004, respectively, but they fell to Republicans, not to challengers from within their own parties.

Jay S. Poole, a Cantor volunteer, said Brat tapped into widespread frustration among voters about the gridlock in Washington and issues such as immigration.

"I can't tell you how amazing this is to me," Poole said.

In the fall, Brat will face Democrat Jack Trammel, also a professor at Randolph-Macon, in the solidly Republican district.

Fox News' Chad Pergram and The Associated Press contributed to this report.