Republicans in the US House of Representatives have, as widely expected, chosen the relative moderate Kevin McCarthy as their next No 2 leader. In choosing him, they hope to unite and move past the turmoil that began with the shocking defeat of the current second-in-command in a primary election.
McCarthy, of California, defeated the more conservative Raul Labrador of Idaho for the position of party leader in the chamber in a secret ballot.
The shake-up began with Eric Cantor's unexpected loss in Virginia's primary last week to a far-right candidate backed by the "tea party" movement. Cantor quickly announced he would step down as the party's House leader on July 31, setting off the scramble for leadership jobs.
The challenges facing the leadership aren't likely to change. They must guide an often fractious rank and file into congressional elections in November, while contending with a Democratic-controlled Senate and President Barack Obama.
Republican restiveness along ideological and regional lines was on full display as members of the House met to elect their leadership line-up for the rest of this year.
Labrador had been supported by some House Republicans who argued that Cantor's defeat showed the need for the party to take a new, more conservative direction. But McCarthy's knack for helping colleagues get elected and his ability to maintain a personal connection quickly gave him the advantage as he emerged as the front runner.
A more competitive race took place to replace McCarthy as the party whip, the No 3 position in the House. That race was won by Louisiana's Steve Scalise - a clear indication that the rank and file wanted someone from a deeply conservative state in the upper ranks of leadership for the first time since the party gained control of the House in 2010.
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 living in the United States 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-backed challenger.
In setting quick elections, the leader of the House, Speaker John Boehner, and other Republican leaders hoped to avoid a drawn-out, divisive struggle that might complicate the party's drive to retain its majority in midterm balloting on November 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 after the national elections.
Many Republicans said now was a time for calm.
"Given the way Cantor is going out, it's important to show a little bit of stability," said Congressman John Campbell, who said he backed McCarthy.