Republican Kevin McCarthy has been elected speaker of the US House of Representatives after making extensive concessions to a group of right-wing hardliners that raised questions about the party's ability to govern.
The 57-year-old Californian suffered one final humiliation when Representative Matt Gaetz withheld his vote on the 14th ballot as midnight approached, prompting a scuffle in which fellow Republican Mike Rogers had to be physically pulled away.
McCarthy's victory in the 15th ballot early on Saturday brought an end to the deepest congressional dysfunction in 160 years. But it sharply illustrated the difficulties that he will face in leading a narrow and deeply polarised majority.
He won at last on a margin of 216-211. He was able to be elected with the votes of fewer than half the House members only because five in his own party withheld their votes - not backing McCarthy as leader, but also not voting for another contender.
McCarthy agreed to a demand by hardliners that any lawmaker be able call for his removal at any time. That will sharply cut the power he will hold when trying to pass legislation on critical issues including funding the government, addressing the nation's looming debt ceiling and other crises that may arise.
"We got the things that are transformational," said Republican Representative Ralph Norman, who voted to back McCarthy after opposing him for much of the week.
Republicans' weaker-than-expected performance in November's midterm elections left them with a narrow 222-212 majority, which has given outsized power to the right-wing hardliners who have opposed McCarthy's leadership.
Those concessions, including sharp spending cuts and other curbs on McCarthy's leadership, could point to further turbulence in the months ahead, especially when Congress will need to sign off on a further increase of the United States' $US31.4 ($A45.6) trillion borrowing authority.
Over the past decade, Republicans have repeatedly shut down much of the government and pushed the world's largest borrower to the brink of default in efforts to extract steep spending cuts, usually without success.
Several of the hardliners have questioned McCarthy's willingness to engage in such brinksmanship when negotiating with President Joe Biden, whose Democrats control the Senate. They have raged in the past when Senate Republicans led by Mitch McConnell agreed to compromise deals.
The hardliners, also including Freedom Caucus Chairman Scott Perry and Chip Roy of Texas, said concessions they extracted from McCarthy will make it easier to pursue such tactics this year - or force another vote on McCarthy's leadership if he does not live up to their expectations.
"You have changes in how we're going to spend and allocate money that are going to be historic," said Representative Scott Perry, the chairman of the hard-right House Freedom Caucus.
"We don't want clean debt ceilings to just go through and just keep paying the bill without some counteracting effort to control spending when the Democrats control the White House and control the Senate."
Wielding the speaker's gavel will give McCarthy the authority to block Biden's legislative agenda, force votes for Republican priorities on the economy, energy and immigration and move forward with investigations of Biden, his administration and his family.