For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Senate Republicans learned Thursday evening that they have a $350 billion problem. The news came as senators congregated on the chamber’s floor for a procedural vote, and lead to a tense intra-party showdown that left Majority Leader Mitch McConnell (R-Ky.) visibly sullen. The revenue trigger Republicans had planned to include in their tax bill violates the chamber’s procedural rules and will have to be scrapped at the last minute—threatening support from a cohort of Republicans concerned about the massive hole the GOP’s tax cuts would blow into the national debt.

The verdict from Elizabeth MacDonough, the usually obscure Senate parliamentarian, came amidst what should have been a hopeless move by Democrats to send the tax bill off the Senate floor and back to the finance committee. Instead, the vote locked at 48 in favor of slowing down, and 49 against, as Sens. Bob Corker (R-Tenn.), Jeff Flake (R-Ariz.), and Ron Johnson (R-Wis.) refused to keep the bill moving forward.

Without a trigger to raise taxes if revenue falls short, Corker and Flake want assurances that the bill won’t pile up the national debt. On the Senate floor, Republican colleagues surrounded the pair to urge them to keep the bill moving forward. Hours earlier, the Joint Committee on Taxation (JCT) had found that the tax bill would add $1 trillion in deficit spending over the next decade, even when analyzed by Republicans’ favored method of “dynamic scoring” that takes into account how the tax cuts might boost economic output. Corker could be heard saying the bill was a “trillion [dollars] off.”

Sen. Mark Warner (D-Va.) broke through and appeared to lobby Corker to hold his ground. Minority Leader Chuck Schumer (D-N.Y.) roamed at the edge of the chamber, appearing delighted by the disarray. Off to the side was Johnson. He’s pushing for an even larger tax cut for the type of business, known as a “pass-through,” that his family runs. McConnell showed little patience for his grandstanding. As they went back and forth, McConnell threw up his arms and sulked away.

McConnell’s deputy John Cornyn (R-Tex.) said on the floor “we’re gonna fix it.” Their word was apparently enough. As the vote initially scheduled for 15 minutes dragged past an hour, all three holdouts joined their Republican colleagues to defeat the Democrats’ motion.

In exchange, Republican leaders are now looking to shave off $350 billion from the bill’s total cost. Republicans were intending to keep the Senate open all night in order to put the bill up to a vote as soon as possible, but after the mini-rebellion party leaders delayed all proceedings until Friday morning to give aides time to devise a compromise. Corker and Sen. Pat Toomey (R-Pa.) are now trying to work out how much money to raise. Cornyn said it would likely come from gradually increasing corporate taxes about six years from now. “Some sort of stair step,” he said.

Back on the Senate floor, Sen. Bernie Sanders (D-Vt.) was beating the populist drum. He asked Toomey to promise that he wouldn’t cut Social Security, Medicare, and Medicaid after passing the tax bill. Toomey replied that no one who is currently on those programs would see a change. “There it is!,” Sanders interrupted. Toomey had “let the cat of the box, or whatever the phrase is”.

“He just let the cat out of the box” -Bernie Sanders pic.twitter.com/SYAsKvACmL — southpaw (@nycsouthpaw) November 30, 2017

Earlier in the day, Sen. John McCain (R-Ariz.) eased Republicans’ concerns by coming out in favor of the bill. Later in the evening, as he was moved through the Senate in a wheelchair, a reporter asked McCain if he considered the dash to write the bill to be “regular order,” the demand the senator required when he voted down Obamacare repeal earlier this year. “They’re doing it,” McCain said. What exactly they’re doing remains to be seen on Friday.