Instead, the White House said President Obama will sign the measure despite all the projects, and push for fewer earmarks in next year's budget. During last year's campaign, Obama promised to cut earmarks drastically and institute other changes.
Lawmakers in both parties defend the practice, and 10 Republicans joined most Democrats to defeat McCain's amendment.
"Yes, I fight for funds for my state. That's what I came here to do," said Senator Dianne Feinstein, a California Democrat and senior member of the Senate Appropriations Committee, which doles out the earmarks. "Candidly, why be an appropriator if you can't help your state?"
But the Senate still faces a difficult vote on an amendment by Senator David Vitter, a Louisiana Republican, to scrap the current congressional pay system. It gives automatic cost-of-living pay raises to members of Congress unless they act to deny themselves a raise.
"At a time when so many Americans are losing their jobs and struggling to pay their mortgages, these raises just aren't right," Vitter said. "Most Americans don't have a formula at their job that gives them automatic pay raises, and Congress shouldn't either."
Lawmakers now make $174,000 a year, having received a $4,700 raise in January. Vitter's amendment would deny lawmakers the raise they are due next January.
Democratic leaders had hoped to pass the measure last week, but Republicans withheld the votes required to clear an important procedural hurdle and insisted on the right to offer additional amendments. Now, it's anticipated the measure will pass today.
Democrats stand poised to defeat all amendments because they don't want the measure to return to the House for a further vote. House Speaker Nancy Pelosi has threatened to scrap the bill in that event.
The 1,132-page spending bill awards big increases to domestic programs and is stuffed with pet projects. The measure wraps together nine spending bills to pay for the annual operating budgets of every Cabinet department through Sept. 30, except for the departments of defense, homeland security, and veterans affairs.
The bill has 7,991 pet projects, totaling $5.5 billion, according to calculations by the GOP staff of the House Appropriations Committee.