House Republicans on Wednesday passed the rule governing debate on bipartisan legislation to lift the debt ceiling, a procedural hurdle that paves the way for final passage of the bill later in the day — but it took an emergency assist from Democrats.

Lawmakers approved the rule in a 241-187 vote just days before June 5, the day Treasury Department Secretary Janet Yellen has said the U.S. could plunge into default if the borrowing limit is not raised.

But the vote was not without a good deal of drama.

And despite its passage, the vote highlights the tenuous hold that Speaker Kevin McCarthy (R-Calif.) has over his restive conference, where many of the same conservatives who had opposed his Speakership in January reemerged on Wednesday to send a clear message that they think McCarthy betrayed his promises to hold the line on budget issues.

While rules votes are typically a partisan, mundane and entirely predictable part of the legislative process, Wednesday’s vote bucked all three trends when more than two dozen Republicans opposed the measure as a last-gasp opportunity to defeat the underlying debt ceiling bill.

And after hanging back, more than 50 Democrats bucked convention to deliver the last-minute votes to push the rule over the finish line.

Before the vote closed, House Minority Leader Hakeem Jeffries (D-N.Y.) held up a green card in an apparent signal of approval for his members to change their votes and help Republicans pass the rule. Democratic members flooded the Well of the House to manually change their votes after voting electronically — though Jeffries remained a ‘nay.’

A number of the Democrats who ultimately voted for the rule are members of the Problem Solvers Caucus, a coalition of bipartisan lawmakers that prides itself on finding common ground.

“We were ready, we had the conversation earlier today — if necessary to be ready to activate and that’s exactly what we did,” Rep. Dean Phillips (D-Minn.), a member of the caucus, told reporters after the rule vote.

“I typically wouldn’t vote for this type of rule,” he later added. “But this is, as I said earlier, this is an extraordinary day, extraordinary measure and required extraordinary consideration.”

“I’m opposed to the bill, I don’t want the bill to advance, and so I’d like for us to work on another bill that did more to try to help improve the country from a fiscal standpoint,” Rep. Bob Good (R-Va.) told The Hill on Tuesday night, explaining why he would oppose the rule.

Rep. Chip Roy (R-Texas), another vocal critic of the bill, took to the House floor Wednesday afternoon to encourage his colleagues to oppose the rule. Twenty-nine did just that, including GOP Reps. Good, Roy, Daniel Bishop (N.C.), and Matt Rosendale (Mont.), all of whom had initially opposed McCarthy’s Speakership in January and expected him to hold the conservative line on issues of spending and deficits.

Given Speaker Kevin McCarthy’s (R-Calif.) thin House majority, 29 GOP defectors seemed like enough to kill the procedural bill — and gum up the whole process — because of an old House tradition that members of the minority party tend to oppose all rules, even when they support the underlying legislation. And heading into the vote, Democratic leaders suggested they would continue that tradition, despite their support for the Biden-backed debt-ceiling package. 

“It’s very simple: The majority is responsible for passing the rule,” Rep. Katherine Clark (D-Mass.), the Democratic whip, told reporters in the Capitol on Wednesday morning.

Clark’s office recommended that Democratic lawmakers vote against the rule.

Yet Democratic leaders, in somewhat cryptic fashion, also vowed not to allow the country to default, forecasting the scenario that ultimately unfolded on the House floor, where 52 Democrats bucked routines and crossed the aisle to secure passage of the rule. 

“Extreme MAGA Republicans voted against House Republican leadership on a bill that they negotiated. That is stunning to me,” Jeffries told reporters after the vote.  “And once again, House Democrats to the rescue to avoid a dangerous default and help House Republicans get legislation over the finish line.” 

Jeffries did not directly answer a question about whether Republicans promised anything in return for Democrats voting in favor of the rule.

McCarthy laughed when NBC News asked him about Jeffries waiting until the last minute to give Democrats the green light to vote for the rule.

“I probably would’ve done the same thing,” McCarthy said. “Well played.”

The unconventional vote launched the debate on the debt ceiling package, negotiated between McCarthy and President Biden, which is scheduled for a final vote Wednesday night. 

The proposal then moves to the Senate, where Majority Leader Chuck Schumer (D-N.Y.) is fighting to pass it before week’s end. 

The debt limit bill — titled the Fiscal Accountability Act — came together after more than a week of high-stakes negotiations between emissaries tapped by Biden and McCarthy.

The legislation, which stretches 99 pages, suspends the debt limit until Jan. 1, 2025, implements some spending caps over the next two years, beefs up work requirements for federal assistance programs and claws back billions of dollars of unspent COVID-19 funds, among other provisions.

Wednesday’s high-profile vote came after the House Rules Committee adopted the rule to govern debate over the debt limit measure Tuesday night, despite two Republicans breaking from their party and opposing it. Votes in the Rules Committee typically break along party lines, with the majority party supporting the rule and the minority party voting against it.

But in a sign of protest against the debt limit bill, two Republicans on the panel — Roy and Rep. Ralph Norman (S.C.) — opposed the rule, putting the bill at risk of being blocked from advancing to the chamber for a vote. Roy and Norman had initially opposed McCarthy’s Speakership, and both have been vocal critics of the legislation.

The Roy-Norman revolt, however, came one vote short of blocking the bill. Rep. Thomas Massie (R-Ky.), another conservative on the Rules panel, voted for the rule, resulting in a 7-6 vote in favor of advancing the measure and sending the rule to the floor for consideration.

Updated at 5:28 p.m.