Republican leader Kevin McCarthy was elected to serve as speaker of the House late Friday night, fulfilling his years-long quest to secure the speaker’s gavel.

In his mission to become the next speaker, McCarthy, who got involved in politics in 1987 when he served as an intern for former GOP Rep. Bill Thomas of California, faced difficulty from a handful of his Republican colleagues.

The 15th and final vote for House speaker gave McCarthy 216 votes, a bare majority that was lower than the normal 218 votes needed because all six of his remaining GOP detractors relented to vote “present.” Representatives Andy Biggs of Arizona, Lauren Boebert of Colorado, Elijah Crane of Arizona, Matt Gaetz of Florida, Bob Good of Virginia and Matt Rosendale of Montana voted “present” in the final round.

“I hope one thing is clear after this week: I will never give up,” McCarthy said after the victorious vote. “I will never give up on you, the American people. And I will never give up on keeping our commitment to America. Our nation is worth fighting for.”

KEVIN MCCARTHY ELECTED HOUSE SPEAKER IN 15TH FLOOR VOTE AFTER DAYS OF HIGH DRAMA

Speaker of the House Kevin McCarthy, R-Calif., delivers remarks after being elected speaker in the House chamber at the U.S. Capitol Jan. 7, 2023, in Washington, D.C.

Speaker of the House Kevin McCarthy, R-Calif., delivers remarks after being elected speaker in the House chamber at the U.S. Capitol Jan. 7, 2023, in Washington, D.C. (Chip Somodevilla/Getty Images)

Speaking to reporters after the vote, McCarthy quipped, “It just reminds me of what my father always told me: ‘It’s not how you start, it’s how you finish.’ And now we have to finish for the American public to turn around.”

McCarthy’s “never give up” message resonates with his career record in politics. In 1995, McCarthy, who was born in Bakersfield, chaired the California Young Republicans and, four years later, the Young Republicans National Federation. McCarthy won his first election in 2000 to serve as a Kern Community College District trustee.

Elected to the California State Assembly in 2002, McCarthy later became the Republican floor leader in 2003. Three years later, he was elected to serve in the U.S. House representing the Golden State’s 22nd Congressional District.

During his time in the House, McCarthy has served in multiple GOP leadership positions as he faced pushback from more right-leaning members of the party who have viewed him as an establishment Republican.

From 2009 to 2011, McCarthy was the House Republicans’ chief deputy whip and later House majority whip for three years. Serving as both the majority and the minority leader, McCarthy has led Republicans in the House the past nine years.

McCarthy’s path to clinching the speaker’s gavel wasn’t easy. He has faced backlash from some in his party — both colleagues and voters — over his support for certain initiatives viewed by conservatives as establishment priorities.

Speaker of the House Kevin McCarthy, R-Calif., celebrates with the gavel after being elected in the House chamber at the U.S. Capitol Jan. 7, 2023, in Washington, D.C.

Speaker of the House Kevin McCarthy, R-Calif., celebrates with the gavel after being elected in the House chamber at the U.S. Capitol Jan. 7, 2023, in Washington, D.C. (Win McNamee/Getty Images)

MCCARTHY THANKS TRUMP AFTER HOUSE SPEAKER VOTE: ‘HE WAS WITH ME FROM THE BEGINNING’

McCarthy was the heir apparent after former House Speaker John Boehner unexpectedly resigned from the position following Pope Francis’ visit to Congress. In 2015, amid Boehner’s departure from Congress, McCarthy, who was then serving as majority leader and was next in line to succeed Boehner, stepped aside to make way for former GOP Wisconsin Rep. Paul Ryan to assume the role of speaker. 

McCarthy’s decision was rooted in the fact he might not have been able to get the right-wing vote. He had angered members of his caucus by stating that Republicans had convened the Benghazi hearings just to undercut the presidential bid of Hillary Clinton.

When the House gaveled in after the 2020 elections, McCarthy won every Republican vote for speaker when former Speaker Nancy Pelosi was assured of victory in the Democrat-controlled 117th Congress. 

But to get enough votes to be elected speaker in 2023, McCarthy, who received support from former President Trump, worked to meet a list of demands from Republicans who withheld their support for him in previous speaker votes.

Former President Trump

Former President Trump (AP Photo/Andrew Harnik, File)

Taking the anti-McCarthy votes off the table capped a week in which McCarthy was able to chip away at the 20 Republicans who opposed him, thanks in large part to negotiations that will dramatically reshape the way the House is run. Some of the most conservative members of the House said they got virtually everything they wanted out of the talks and started to break for McCarthy on Friday morning.

McCarthy agreed to allow a single lawmaker to make a motion to elect a new speaker, returning to the way the House ran for decades before that practice was eliminated under former Speaker Nancy Pelosi. He agreed to votes on term limits and the adoption of a budget resolution that balances the budget in 10 years, and a cap on fiscal year 2024 spending at FY 2022 levels.

McCarthy agreed to reject any negotiations on spending with the Senate until the Senate passes its own spending bills. He agreed not to increase the debt limit without spending cuts or other fiscal reforms, to set up a committee to examine the weaponization of government against U.S. citizens and to ensure no bills are brought up on the floor until at least 72 hours passed.

Several House GOP members pushed back against McCarthy's nomination for speaker. From left to right: GOP representatives Matt Gaetz of Florida, Matt Rosendale of Montana, Lauren Boebert of Colorado and Andy Biggs of Arizona.

Several House GOP members pushed back against McCarthy’s nomination for speaker. From left to right: GOP representatives Matt Gaetz of Florida, Matt Rosendale of Montana, Lauren Boebert of Colorado and Andy Biggs of Arizona. (Win McNamee, Eric Lee/Bloomberg via Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

And he agreed to give three members of the House Freedom Caucus three seats on the House Rules Committee, which sets the terms of debate for all legislation headed to the House floor.

For both Republicans and Democrats, McCarthy’s election means that the regular work of the House can begin. GOP lawmakers have said for months that once their work begins, they will lean heavily on managing the federal government through passing a budget and individual spending bills and tough oversight of the Biden administration.

Fox News’ Peter Kasperowicz contributed to this article.