Weeks after swearing off earmarks, many senators stand to gain tens of millions of dollars for pet projects in a massive spending bill that could be their last chance at the money before a more conservative Congress begins next month.

The $1.2 trillion bill, released on Tuesday, includes more than 6,000 earmarks totaling $8 billion, an amount that many lawmakers decried as an irresponsible binge following a midterm election in which many voters demanded that the government cut spending.

"The American people said just 42 days ago, 'Enough!' . . . Are we tone deaf? Are we stricken with amnesia?" Sen. John McCain (R-Ariz.), a leading earmark critic, said on the Senate floor, flipping through the 1,924-page bill as he pounded his desk.

The bill includes $18 million for two nonprofits associated with deceased Democrats, the late Sen. Edward M. Kennedy and Rep. John P. Murtha; $349,000 for swine waste management in North Carolina; and $6 million for a rural Iowa school program named after Sen. Tom Harkin (D-Iowa).

Senate Minority Leader Mitch McConnell (R-Ky.) epitomizes the conflicted nature of the debate. Formerly a member of the committee that doles out earmarks, McConnell reluctantly embraced a moratorium on the practice last month to send a signal that Republicans are serious about curbing spending.

Yet the legislation includes provisions requested this year by McConnell, including $650,000 for a genetic technology center at the University of Kentucky, according to an analysis of the bill by Taxpayers for Common Sense, a nonpartisan watchdog.

Saying he was now "vigorously in opposition" to the legislation, McConnell said Tuesday that rushed consideration of the bill "here on Christmas Eve" compelled him to try to block the bill through a filibuster. "I'm going to vote against things that arguably would benefit my state. I do not think this is the appropriate way to run the Senate," he said.

But McConnell, like other new earmark opponents, stopped short of asking for his projects to be removed from the bill.

House Republicans are poised to take over the majority next year, vowing to prohibit the earmark practice on their side of the Capitol. With the Senate GOP also nominally opposed to these projects, many lawmakers view this as their last chance at delivering pork before serious fiscal belt tightening begins next year.

The bill's fate was uncertain Tuesday, with a key test vote likely later in the week. The White House has not rallied behind the Democratic proposal. President Obama grew to oppose earmarks when he was a senator and he chided Congress when he signed a similarly massive spending bill in March 2009. House Minority Leader John Boehner (R-Ohio) and dozens of his Republican colleagues sent Obama a letter requesting a veto of any spending measure filled with earmarks.

Crafted privately by a select bipartisan group of senators, the Appropriations Committee combined a dozen spending bills into a single measure that would fund the federal government for a full year. The committee said the bill is $29 billion below the fiscal 2011 budget proposed by President Obama.

The House took a different approach this month in passing an alternative spending bill, known as a "continuing resolution," that would keep funding mostly level through September and contains no earmarks.