Democrats touted extra spending for Head Start preschool programs, food aid for poor pregnant women and biomedical research, and there was more money for the FBI, NASA and the border patrol as well. Democrats claimed victories in protecting a requirement that some gun dealers report sales to the same buyer of multiple firearms and in blocking a GOP effort to curb federal regulation of utilities' greenhouse gas emissions.
Even so, many Democrats voted reluctantly for the measure, unhappy that it didn't include more for the Environmental Protection Agency and federal aid for school districts and handicapped students.
"We endanger our families and our future by shortchanging these programs," Rep. Rosa DeLauro, D-Conn., said.
Just as important to many lawmakers was the bill's signal to voters that members of Congress actually can run the country. The past two years have featured repeated standoffs over deficit reduction, raising the federal debt limit and other budget issues that have soured voters, making lawmakers reluctant to incense them further.
Passage of the legislation sends a positive signal to "all those ankle-biters and naysayers who say we can't get anything done," Rep. Jim Moran, D-Va., said.
The measure also lets legislators put budget battles behind them and turn to campaign-season themes: for the GOP, Obama's health care law, and for Democrats, boosting the incomes of low-earners and the middle class.
In the House, 64 of the 67 "no" votes came from Republicans, including many of the chamber's most conservative members.
The legislation erases cuts Congress enacted last year in annual inflation increases in benefits for wounded military personnel who retire early and their survivors. Those cuts had drawn howls from veterans organizations.
The bill also blocks the government from enforcing regulations aimed at weaning consumers from today's widely used but energy-eating incandescent light bulbs, and gives federal workers a 1 percent raise, their first in four years.
It prevents the post office from ending Saturday deliveries to close its huge budget gap and bars the administration from transferring terrorist suspects held at the Guantanamo Bay, Cuba, detention center to U.S. prisons.
Of the measure's $1.1 trillion, $521 billion is for defense and $492 billion is for nondefense programs. In addition, the bill provides $92 billion for military action overseas, mostly in Afghanistan, and $7 billion for natural disasters.
To give the Senate time to debate the spending measure, Obama signed a measure that Congress sent him financing federal agencies through Saturday.
Associated Press writer Andrew Taylor contributed to this report.