Continued from page 1

Some of the biggest savings come from reductions that would have been made anyway: $6.5 billion in recapturing unspent money from previous years, and an additional $6.2 billion in lower spending for the U.S. Census Bureau, which was already going to see a drop after the 2010 census ended.

“We minimized the damage,” said Rep. Norman D. Dicks of Washington, the ranking Democrat on the House Appropriations Committee.

At Mr. Obama’s insistence, House Republicans gave up their quest to add most legislative add-ons, known as “policy riders,” to the bill. The most contentious of those riders would have stopped funding for the new health care law, for the Environmental Protection Agency’s plans to regulate greenhouse gases, and for Planned Parenthood.

Instead, Mr. Boehner had the Senate agree to hold separate votes on measures to defund Planned Parenthood and Mr. Obama’s health care plan — both efforts failing in the Senate on Thursday.

The final spending bill included restrictions on taxpayer funding for abortions in the District of Columbia, and fully restored a school voucher program in the city.

Congress was late on the spending bills because Democrats failed to produce a budget in either the House or Senate last year, and failed to pass any of the dozen annual appropriations bills to fund the basic functions of government.

Since Oct. 1, the start of the fiscal year, the government has been running on stopgap funding, which left many agency programs in limbo.

The spending bill was the first major test for Mr. Boehner’s pledge to run the House in a more open fashion than his predecessors.

The House spent more than 60 hours debating its bill and held roll-call votes on more than 100 amendments. But in the end, the speaker struck a deal behind closed doors.

The Senate, meanwhile, never passed a version of its own, meaning politically vulnerable senators never had to take a series of difficult votes, but as a result had little role in writing the final compromise.