WASHINGTON — Representative Kevin McCarthy of California capped a meteoric rise through the ranks of power Thursday, winning election as House majority leader as Republicans shuffled their leadership in the wake of Representative Eric Cantor’s primary defeat in Virginia.
Louisiana Representative Steve Scalise, 48, was elected to replace McCarthy as whip, a clear indication that the rank and file wanted a red-state Republican in the upper ranks of leadership for the first time since the party gained control of the House in 2010.
McCarthy, a former aide who won his seat in Congress less than eight years ago, pledged after his victory to make sure the GOP ‘‘has the courage to lead with the wisdom to listen, and we’ll turn this country around.’’
The changes take effect when Cantor steps down as majority leader July 31. The current leader attended the day’s elections but did not speak as his successor was selected.
The challenges facing the leadership aren’t likely to change. They must guide an often fractious rank and file into the fall election season, while contending with a Democratic-controlled Senate and President Obama.
Within moments of McCarthy’s election, the League of United Latin American Citizens issued a statement calling on him to schedule a vote in the House on legislation to overhaul immigration law, including a path to citizenship for millions of immigrants currently living in the country illegally.
The issue has long divided Republicans and figured prominently in Cantor’s defeat a little more a week ago, when he was trounced by David Brat, a little-known, underfunded Tea Party movement-backed challenger.
In setting quick elections, Speaker John Boehner and other leaders hoped to avoid a drawn-out, divisive struggle that might complicate the party’s drive to retain its majority in midterm balloting Nov. 4.
Yet the timing of the day’s events made it unclear whether the winners — or perhaps Boehner, himself — might face fresh challenges when the rank and file gathers in the fall after national elections.
At a news conference after the closed-door elections, Scalise and several Republicans stressed the party is united as it heads into the last several months of the year. They were at pains to project that image, as well, refusing even to provide the vote totals that might betray any internal division.
McCarthy moved quickly to line up the votes for majority leader in the wake of Cantor’s defeat at the polls in Virginia, deploying an organization developed since he became whip more than three years ago when Republicans took control of the House.
McCarthy was first elected to Congress in 2006, after serving as an aide to Representative Bill Thomas of California and as a member of the California Legislature.
He was named chief deputy whip by Cantor in 2009 and became whip after Republicans won control of the House in the 2010 elections.
McCarthy is the first House member to become majority or minority leader after serving fewer than five full terms in the chamber, said Eric Ostermeier, research associate at the University of Minnesota’s Center for the Study of Politics and Governance.
If McCarthy’s ascension seemed a foregone conclusion, the battle to take his whip’s spot was anything but — so much so that there was speculation that a second ballot might be required to settle the contest.
In the end, it wasn’t necessary, as Scalise won on the first round.
Scalise campaigned as head of the Republican Study Committee, a group of that sometimes serves as a conservative thorn in the side of leadership.