Rep. Kevin McCarthy has been elected House speaker after multiple days of negotiations and 15 rounds of voting.
The final tally was 216 votes for McCarthy, 212 for Democratic House leader Hakeem Jeffries with six representatives voting "present."
Republicans previously agreed to nominate McCarthy, but his path to the speakership was uncertain after a group of GOP holdouts threatened to derail his bid.
Several days of gridlock gave way to dramatic moments late Friday evening. In the 14th round, an extraordinary scene erupted, with McCarthy confronting Rep. Matt Gaetz, whose vote on that ballot could have given him the role he has sought for so long.
After a failed motion to adjourn until Monday, McCarthy finally had the votes to secure the position.
When the win was announced, Reps. Steve Scalise, Elise Stefanik, and Ryan Zinke, the last member to vote, all ran over to McCarthy with their vote cards for him to sign.
The entire GOP conference was on their feet clapping. McCarthy hugged many members that came up to him and waved to folks in the gallery.
McCarthy came off the floor, expressing relief saying, “I’m glad it’s over.”
He also denied Rep. Matt Gaetz was offered chairmanship of a subcommittee in exchange for his "present" vote on speaker and said it would be up to the steering committee to decide those appointments.
“No one gets promised anything,” McCarthy said. “Whatever happens in steering.”
The GOP only holds a slim majority in the chamber – 222 Republicans compared with 212 Democrats – which meant McCarthy could not afford many defections.
McCarthy represents California and previously served as House minority leader. McCarthy has already vowed to launch multiple investigations into President Joe Biden and his administration.
Now, the House can proceed with the rest of its business, including administering the oath of office to newly elected members.
CNN's Ted Barrett and Kit Maher contributed to this report.