Facing intense pressure to avoid a government shutdown, the US House of Representatives passed a $1.1 trillion federal spending bill, sending it to the Senate barely two hours before a midnight deadline.
The 219-206 vote followed a bruising day of arm-twisting by the White House after dozens of Democrats revolted over pro-Wall Street and campaign-finance riders in the bill, dramatically splitting with President Barack Obama over the legislation that funds most federal operations through September.
Senate Majority Leader Harry Reid said immediately after the vote that his chamber will take up the must-pass legislation Friday.
The two chambers will therefore need to pass a short-term extension to keep government open beyond Thursday's witching hour.
The spending package would fund most federal operations through September 30, the end of the 2015 fiscal year.
The deal almost did not happen, forcing the White House and Obama, who came out in favor of the measure, into near-panic mode as they scrambled to get enough Democrats on board.
House Speaker John Boehner confidently said earlier in the day that he would have the votes, but he was forced to suspend proceedings in the House when he realized he was short, fueling a tense Capitol Hill showdown.
Progressive Democrats were furious over a clause buried deep in the 1,603-page bill that rolls back key financial regulations on Wall Street.
- Bitter compromise -
Top House Democrat Nancy Pelosi joined the revolt.
In a stunning rebuke of Obama on the House floor she blasted as "blackmail" the effort to shred reforms in the so-called Dodd-Frank law that prevents big banks from making risky derivatives trades protected by taxpayer-insured funds.
Pelosi and others argued that the change opens the door to another big bank bailout that rescued foundering financial institutions during the worst of the Great Recession. That, Democrats fear, could lead to a repeat of conditions that fueled the financial crisis of 2007-2008.
Democrats are also angered by a rider which would dramatically expand the amount that wealthy individuals can contribute to national political parties -- a move which would undercut campaign finance reforms from 2002.
Senior House Democrat Steve Israel warned that the two provisions were poison pills "that Democrats can't swallow," and said he hoped Boehner would strip them out and start anew.
Democratic congresswoman Maxine Waters was furious about the provisions, and suggested she was unimpressed by the White House dispatching chief of staff Denis McDonough up to the US Capitol to meet with distressed Democrats about the bill.
"We don't like lobbying that is being done by the president or anybody else that allows us to... give a big gift to Wall Street," Waters boomed to reporters.
"We're going to fight it. We're fighting anybody who is lobbying to tell people to vote for this bill."
Asked if McDonough swayed Democrats toward voting for the measure, congressman Bill Pascrell sneered "absolutely not."
Fifty-seven Democrats ultimately joined most Republicans in supporting the measure.
Conservative Republicans, for their part, are angry that the bill takes no direct steps to block Obama's executive action on immigration, announced last month, that would shield millions from deportation.
As a compromise, the measure provides only two months of funding for the Department of Homeland Security, allowing the Congress -- which returns to full Republican control next year -- an opportunity to revisit funding for the agency that will handle Obama's immigration action.
Such mega-laws are greased by backroom negotiating and often introduced at the last minute.
To expedite the process, lawmakers vote not on each amendment, but on the final text. The take-it-or-leave-it approach is a double-edged sword: approval can be swift, but rejection can trigger a government shutdown.