Republicans in the U.S. House of Representatives on Thursday chose an ally of Speaker John Boehner for the No. 2 job in the chamber, a setback for some conservatives hoping to use a leadership election to boost their influence.

Rep. Kevin McCarthy of California, already the third-ranking House Republican, was chosen to replace Eric Cantor as majority leader. He will control the House floor and help decide the party's legislative priorities.

Steve Scalise, a Louisiana lawmaker with backing from Southern Republicans, beat out two other lawmakers on Thursday to replace McCarthy as party whip, drumming up votes for bills.