After unexpectedly losing his Republican congressional primary, House Majority Leader Eric Cantor will step down as majority leader, he announced at a Capitol Hill news conference this afternoon.

“It is with great humility that I do so,” Cantor said, noting that he would serve in his leadership post until July 31. “There’s a balance between holding a leadership position and serving constituents at home.”

An election to replace Cantor as majority leader will take place June 19, several sources told ABC News, giving Republicans one week to jockey for position. Cantor threw his support behind GOP Majority Whip Kevin McCarthy, R-Calif., should he choose to pursue the majority leader position.

Cantor also indicated he has no plans to mount a write-in campaign in his district, but he will serve out his congressional term.

Cantor's voice shook a bit as he tried to strike an optimistic tone about his future. He declined to answer questions about why he lost, saying he'll leave the political analysis to others.

"This town should be about trying to strike common ground," he said.

Cantor, 51, officially told his colleagues about his plan to step down during a meeting of the House GOP's rank-and-file this afternoon. It was an emotional scene inside, lawmakers and aides told ABC News, with House Speaker John Boehner, R-Ohio, tearing up once again. Boehner told fellow lawmakers, “This is a speech I never expected to give.”

“Eric, we salute you, and we thank you, and your amazing staff as well,” Boehner said, according to sources. “We're losing a leader, but you'll never stop being our colleague and our friend.”

Cantor lost his Republican primary Tuesday in Virginia’s 7th congressional district to Dave Brat, an economics and ethics professor at Randolph-Macon College in Ashland, Virginia, and political unknown who enjoyed support among some tea party activists.

His victory breathes new life into the tea party movement, which, for instance, sees the chance to defeat veteran Mississippi Sen. Thad Cochran in the GOP runoff later this month as the next opportunity to upend the Republican establishment.

Cantor became the first person in U.S. history to lose his party's primary while holding the position of House majority leader, according to Roll Call, the Capitol Hill newspaper.

In his remarks at the Capitol today, Cantor acknowledged that he “suffered a personal setback last night,” but added, “I couldn’t be more optimistic about the future of this country.”

Get real-time election results and news about all the races you care about delivered right to your phone from now until November. To start, just "star" this story in ABC News' phone app. Download ABC News for iPhone here or ABC News for Android here.