Republican leader Mitch McConnell of Kentucky had thrown his weight against the bill in recent days, saying it was "unbelievable" that Democrats would try to muscle through in the days before Christmas legislation that usually takes months to debate.
"Just a few weeks after the voters told us they don't want us rushing major pieces of complicated, costly, far-reaching legislation through Congress, we get this," McConnell said. "This is no way to legislate."
The turn of events was a major victory for earmark opponents like Sens. John McCain, R-Ariz., and Tom Coburn, R-Okla., who for years have been steamrolled by the old-school members of the powerful Appropriations Committee.
The spending barons saw their power ebb in the wake of midterm elections that delivered major gains for Republicans -- with considerable help from anti-spending tea party activists.
"We just saw something extraordinary on the floor of the United States Senate," a grinning McCain said.
The $1.27 trillion catchall bill wrapped together 12 bills -- blending $1.1 trillion for the operating budgets of every federal agency with an infusion of funding to carry the war in Afghanistan into its 10th year -- into a single foot-tall piece of legislation that Democrats had hoped to pass with just a couple of days' worth of debate.
It was designed to bankroll the day-to-day operations of the government for the budget year that started Oct. 1, funding the almost one-third of the federal budget that Congress has to pass each year.
The House and Senate typically spend months on the 12 annual spending bills, but Democrats didn't bring even a single one to the Senate floor this year, an unprecedented collapse of an appropriations process. The House only passed two of the 12 bills and didn't make any of the other 10 public.
The sinking of the bill was a setback for President Barack Obama, who supported it despite provisions to block the Pentagon from transferring Guantanamo Bay prisoners to the United States and fund a program to develop a second engine for the F-35 Joint Strike Fighter, which the administration says is a waste of money. Obama came under fire from Republicans for supporting the bill after promising after the election to take a harder line on earmarks.
Just Thursday, Secretary of Defense Robert Gates made a public push for the omnibus measure at an appearance at the White House, saying that operating under a stopgap measure frozen at current levels would be a major hardship for the Pentagon.
McConnell had earlier quietly backed the effort to produce the legislation, which had significant input from Republicans on the Appropriations panel.
But release of the bill on Tuesday sparked an outcry among the GOP's conservative political base. Senate Republicans held two combative closed-door meetings in which the rank-and-file turned up the heat on those few Republicans who were considering voting for the bill.
Republicans were also irate that the measure contained money to begin implementation of Obama's controversial health care law and a financial overhaul measure that all but a handful of Republicans opposed.
On the merits, most of the rest of the bill had bipartisan support. It stuck to a spending cap sought by Republicans while boosting spending for Head Start, veterans programs and Pell Grants for disadvantaged college students. But that message didn't get out amid the firestorm over earmarks and the measure's remarkable size.
McConnell proposed Thursday to keep the government running at current funding levels through Feb. 18. By then, Republicans will have taken over the House and bolstered their strength in the Senate, giving them greater leverage to force spending cuts.
The House last week passed a yearlong funding bill that's mostly frozen at current levels.