Updated December 11, 2014, 4:00 p.m.

Congress found itself on the brink of an unexpected government shutdown on Thursday as House Republican leaders were forced to postpone a vote on a $1.013 trillion spending package hours before their deadline.

The 1,600-page proposal, unveiled less than two days ago, would fund nearly the entire federal government through September, but Democrats revolted over an extraneous provision rolling back regulations on Wall Street. By mid-afternoon, Speaker John Boehner and his lieutenants were in a rare and awkward alliance with the White House in seeking to overcome opposition both from conservatives and liberals. President Obama and other administration officials scrambled to shore up support in their party and were phoning lawmakers late into the afternoon.

In perhaps the most surprising development, House Minority Leader Nancy Pelosi campaigned in harsh tones against the Obama administration, accusing a Democratic president she has loyally backed for six years of backing a measure that "blackmailed" her members. "This is a ransom. This is a blackmail," she declared in a fiery floor speech. She warned that the provision weakening regulations on derivatives trading, enacted in the 2010 Dodd-Frank Wall Street reform law, could lead to the same financial calamity that befell the nation when the economy collapsed in 2008. "We're being asked to vote for a moral hazard," she said. "Why is this in an appropriations bill? Because it is the price of an appropriations bill."

But Democratic opponents are taking a big risk, as Boehner has warned them that if this bill fails, he'll bring up a stopgap measure that would push the fight into the new Congress that begins in January, when Republicans will have majorities in both the House and the Senate. Pelosi has used the fight over the spending bill to try to prove her relevance heading into the next Congress, when she will be leading a Democratic caucus smaller than at any time in decades. When GOP leaders delayed the vote, the former speaker sent off a missive to her members urging them to stand firm and insisting that Republicans "don't have enough votes to pass" the bill that Beltway insiders have derisively dubbed "the CRomnibus." "This increases our leverage to get two offensive provisions of the bill removed: the bank bailout and big money for campaigns provision," Pelosi wrote.

Introduced in the House on Tuesday, the measure funds all but one department in the federal government through next September. It boosts spending for the fight against Ebola and the war against the Islamic State while cutting funds for the IRS and the EPA. Earlier Thursday, Boehner voiced confidence the measure would clear the House. "I expect this bill will receive bipartisan support and pass," he told reporters. But the measure's prospects worsened during a procedural vote shortly before noon to bring the bill up for debate. With Democrats united in opposition, Boehner and his deputies had to persuade a handful of recalcitrant Republicans to support the motion in a vote that was briefly deadlocked and held open for twice its allotted time. The motion passed by a single vote, 214-212, to set up the final vote.