Anna Moneymaker/Getty Images
House Speaker Kevin McCarthy speaks at an event celebrating 100 days of House Republican rule at the Capitol Building April 17 in Washington, DC.
CNN  — 

The House voted Wednesday to pass a bill raising the nation’s debt ceiling, after days of wrangling Republican lawmakers to unify behind the package, which would bolster House Speaker Kevin McCarthy’s position at the negotiating table with the White House.

The final vote was 217-215, with four Republicans – Ken Buck of Colorado, Andy Biggs of Arizona, Tim Burchett of Tennessee and Matt Gaetz of Florida – voting against the bill. McCarthy could only lose four votes and prevail on the vote.

The measure is dead on arrival in the Democratic-led Senate, but is primarily aimed at boosting Republicans’ efforts to negotiate with Democrats as the country approaches its default deadline as soon as this summer.

Throughout the day, House Republicans rallied around their proposal to raise the nation’s borrowing limit and slash federal spending after leadership made a flurry of last-minute changes designed to win over key GOP holdouts – a major reversal after leadership insisted they would not alter the bill text.

Following a closed-door conference meeting on Wednesday morning, where McCarthy walked members through some of the 11th-hour changes, a number of conservatives and members representing ethanol-producing states who had initially signaled opposition began to fall in line.

In an optimistic sign, GOP leaders appeared to have flipped one no vote to supporting the legislation in with Rep. Nancy Mace of South Carolina, who had said as early as Wednesday morning that she opposed the measure.

“I feel heard by the speaker, and … I will support the debt ceiling vote today because he listened to my concerns,” Mace told reporters after meeting with McCarthy.

GOP leaders, however, faced two stubborn pockets of opposition heading into Wednesday’s vote, despite an intense whipping effort and weeks of negotiations over the proposal. After the House Rules Committee recessed before midnight Tuesday night, leaders scrambled behind the scenes to find a way to convince the two different groups of holdouts to back their legislation. When the rules committee came back in the early Wednesday morning hours, they had a series of changes that they hoped would get them the votes they needed.

Among those changes: Republicans agreed to allow proposed work requirements for Medicaid beneficiaries to be implemented on a quicker timetable – a move intended to win over GOP Rep. Matt Gaetz of Florida and others who had warned they would vote against the bill without such changes.

And top Republicans also agreed to remove a repeal of certain tax breaks for biofuels like ethanol — an issue that prompted furious opposition from the four Iowa Republicans and some other midwestern lawmakers.

In the wake of the changes, a number of Republicans came out in support of the bill, including members of the Iowa delegation who’d spent the previous 24 hours imploring leadership to reverse course on repealing several biofuel subsidies.

“I think all of us are very pleased that the speaker looked at things, and was willing to engage in conversation and to make the acknowledgment that there were being addressed retroactively,” Iowa Republican Rep. Mariannette Miller-Meeks told reporters.

Rep. Zach Nunn, another member of the Iowa delegation, signaled that members would – after a thorough review – back the bill, while Rep. Derrick Van Orden, a Wisconsin Republican, said he was a “yes” after leadership included his proposed biofuels amendment.

A number of conservative congressmen also signaled support for the bill following Wednesday’s conference meeting, including House Freedom Caucus Chairman Scott Perry, Ralph Norman of South Carolina and Andrew Clyde of Georgia.

“I am planning to vote yes,” Perry told CNN. “I love the changes. Some are a step in the right direction. Some are not viewed as a step in the right direction, but you got to balance it.”

Norman warned, however, he would not support any future versions that don’t go as far – a preview of the challenges to come in hashing out a debt ceiling deal with Democrats.

Behind closed-doors, McCarthy sought to downplay the last-minute tweaks and framed them as “technical changes,” according to a source in the room, in an attempt to mollify concerns from members.

House Majority Whip Tom Emmer also defended leadership’s decision to reverse course and make changes to the plan they had initially drafted.

“The bill was closed. You just heard that there were technical changes. There’s nothing of substance that was changed in the bill,” Emmer said at a news conference. “So the bill was closed, and we will pass it.”

‘This is what gets us in the game’

Key McCarthy allies said the bill must pass Wednesday in order to strengthen their argument against the Democrats’ inaction on the issue so far.

“This is what gets us in the game,” said Rep. Kelly Armstrong of North Dakota. “This is the first conversation. The next conversation is what comes next and we know that and this is part of negotiation. We know we don’t control all three. We don’t control the White House and the Senate but this gets us where we need to start.”

GOP Rep. Dusty Johnson outlined that the strategy for getting holdouts on board was to sell this vote as an opening salvo to get McCarthy to the negotiating table with President Joe Biden.

“Most folks were able to have some grace in those minor areas of disagreement because they know they want to get Kevin McCarthy and Joe Biden at the table,” he said.

Biden reiterated Wednesday that he would not meet with McCarthy on extending the debt limit, saying it’s “not negotiable.”

“They haven’t figured out the debt limit yet,” Biden told reporters in the Rose Garden, referring to House Republicans. “I’m happy to meet with McCarthy, but not on whether or not the debt limit gets extended. That’s not negotiable.”

Rep. Patrick McHenry of North Carolina, a GOP leadership ally, predicted, “We’re going to have a really good win today,” and also said it was important to show GOP unity on the issue.

“Any president that refuses to negotiate does so at their own peril and to the detriment of the American economy,” he said. “This president is putting himself in a terrible position. And us passing this bill this week will show that House Republicans have a position, we’ve raised the debt limit, we’ve made an offer, and we have a menu of options we’ve put before the president. He needs to come to the table and start being a grown-up in this situation and negotiate with the legislative branch.”

Inside the conference, most Republicans were upbeat about the prospects for passage, with McCarthy making an appeal to his members to vote on the bill and pass it Wednesday.

“This has been a very collaborative process,” Rep. Dan Crenshaw, a Republican from Texas, told CNN. “It’s why you are seeing such broad support that surprised me even.”

View this interactive content on CNN.com

What’s in the bill?

Passing the bill, however, is just the first step for Republicans, and it’s not clear when Biden would sit down again with McCarthy.

The package raises the nation’s $31.4 trillion debt limit by an additional $1.5 trillion. But the plan also states that if the new debt limit is not breached by March 31, 2024, then Congress must again increase the borrowing authority by that date, proposing to reignite a major fiscal battle in the middle of a presidential election year.

In their “Limit, Save, Grow Act,” House Republicans propose sizable cuts to domestic programs and intend to spare the Pentagon’s budget, returning funding for federal agencies to 2022 levels while aiming to limit the growth in spending to 1% per year. The nonpartisan Congressional Budget Office said that the bill would trim government deficits by $4.8 trillion over 10 years.

As part of the 320-page bill, the GOP also proposes to block Biden’s plan to grant student loan forgiveness, repeal green energy tax credits and kill new Internal Revenue Service funding enacted as part of the Inflation Reduction Act. The measure would also impose new proposals to give Congress more power to halt regulations from the executive branch. The plan would also expedite new oil drilling projects while rescinding funding enacted to respond to the Covid-19 pandemic.

Wrangling the diverse conference to coalesce around the bill is the biggest test yet for McCarthy, who just hit 100 days in the role after a tumultuous journey to capture the gavel.

This story and headline have been updated with additional developments.