The House Republican leadership standoff ended early Saturday morning with Kevin McCarthy winning the speaker's gavel on a historic 15th vote.
It was the longest such election since 1859.
The drama stretched into a fourth day Friday with three more failed votes to decide on a speaker after 11 others over Tuesday, Wednesday, and Thursday -- the last one ending in a heated one-vote loss at the hands of holdout Matt Gaetz.
McCarthy had been stymied by a small group of hardliners demanding concessions to reshape how the House is run and legislation it prioritizes.
What's next for the House after McCarthy's win
The House is adjourned until 5 p.m. Monday.
Members were advised by GOP Whip Tom Emmer's office that the consideration of the rules package was postponed until Monday.
The rules package will outline how the chamber will run. A summary of the package released Friday included a key concession from McCarthy to his GOP detractors on the motion to vacate, allowing just one member to force a vote of no confidence to potentially oust the speaker.
McCarthy's offer to his Republican opponents earlier this week included putting more House Freedom Caucus members on the influential House Rules Committee, and pledging votes on pieces of legislation that the caucus members have been pushing for, including a bill on term limits for lawmakers and a bill on border security.
McCarthy previews first actions of the new GOP-controlled House
Kevin McCarthy, just before swearing-in members, listed some of the priorities for the Republican majority in this 118th Congress.
The newly-elected House speaker said the very first bill Republicans will bring to the floor would repeal the billions of dollars in funding for additional Internal Revenue Service workers under the Inflation Reduction Act. Republicans assert the funding will result in the hiring of 87,000 agents to target middle-income families, which the Treasury Department has said isn't the case.
He then laid out what Republicans will be investigating, stating "one of our first hearings will be held at the Southern border."
He said to also expect committees to be formed to investigate how to win the economic competition with China, the withdrawal of American troops from Afghanistan and the origins of COVID-19.
"We will use the power of the purse and the power of the subpoena to get the job done," he said.
More details on the party's legislative agenda can be read here.
McCarthy credits Trump's 'influence' after his speaker win
McCarthy told reporters early Saturday that it was the influence of former President Donald Trump that helped push the final holdouts over the finish line.
"I especially want to thank President Trump. I don't think anybody should doubt his influence," McCarthy said. "He was with me from the beginning ... he was all in."
"I was just talking to him tonight, helping get those final votes," McCarthy said.
At one point during Friday's session, Rep. Marjorie Taylor Greene tried to hand her phone to Republican holdout Rep. Matt Rosendale with Trump presumably on the line. You can see "DT" as the caller on her phone.
But Trump's enthusiastic vote of confidence in McCarthy earlier in the week appeared to be a non-factor as, despite his warning that failing to elect McCarthy would be a disaster, not a single holdout changed their vote until days later -- and after McCarthy made several key concessions.
-ABC News' Rachel Scott, Lauren Peller, Allie Pecorin, Lalee Ibssa and Katherine Faulders
Most contentious speaker battle in over a century ends
The most contentious battle for House speaker in more than 160 years has officially come to an end.
Days after being called a "squatter" by some members of his own party -- McCarthy now has his name across the House speaker's office.
"I will work with anyone and everyone who shares our passion to deliver a better future for our nation,” McCarthy pledged as he received the gavel early Saturday morning. “As a Congress, we can only operate if we cooperate. My door will be open. I'd like you to come by."
-ABC News' Rachel Scott
McCarthy takes oath of office, tells members 'I never give up'
"I may not know all of you, some of you are new," McCarthy said as he wrapped up his remarks. "But I hope one thing is clear after this week: I never give up."
"I make this promise, I'll never give up on you the American people," he added.
McCarthy then took his oath of office and is now the 55th speaker of the House of Representatives.