Updated

Congress on Thursday passed a long-awaited budget funding the government for the rest of the fiscal year, though dozens of lawmakers on both sides of the aisle voted against the compromise proposal.

The legislation making $38.5 billion in cuts from domestic programs now goes to President Obama for his signature. He is expected to sign the bill into law Friday.

The final vote in the House was 260-167, with 59 Republicans opposing the package -- one House Speaker John Boehner had touted as the best deal he could get out of spending cut-averse Democrats.

In the Senate, the final vote was 81-19, with 14 Republicans dissenting.

Final passage ends, for the time being, the recurring concerns about a government shutdown that have loomed over Washington as it limped from one stopgap budget to another for the better part of the year.

The package represents a compromise between Republican and Democratic congressional leaders, though lawmakers had raised concerns about its contents leading up to the vote. Conservatives in particular were disappointed after a Congressional Budget Office report showed the package only saves $352 million from non-war accounts this year -- compared with the $38.5 billion in cuts Boehner had claimed.

The CBO study confirmed the measure trims more than $38 billion in new spending authority relative to current levels, but many of the cuts come in slow-spending accounts like water-and-sewer grants that don't have an immediate deficit impact. Other cuts come in areas where the government was unlikely to spend the money anyway, CBO suggested.

In the moments before passage, Boehner took to the floor to defend the bill. Pulling out charts that showed spending in 2011 finally going down as compared with previous years, he said the deal is like "throwing your car into reverse" for government spending.

"It couldn't be more stark," he said. "This bill starts us moving in the right direction."

Along with trying to finalize the budget for the rest of 2011, the House is tackling several other key items Thursday. As part of the budget compromise, the House passed separate bills to defund the federal health care law (240-185) and cut money for Planned Parenthood (241-185).

Also, the House is expected to start debate on the 2012 budget proposal authored by Rep. Paul Ryan, R-Wis. That proposal has been pilloried by Democrats concerned that its proposed changes to Medicare would burden seniors with higher out-of-pocket health care costs.

Despite concerns about the 2011 bill, congressional leaders had urged members to approve it so they could move on to debating the 2012 proposals.

Though the CBO report suggested some savings will be delayed in the 2011 deal, Boehner repeated the claim that it would cut $315 billion over 10 years.

To a fair degree, the lack of immediate budget-cutting is because the budget year is more than half over and cuts in new spending authority typically are slow to register on deficit tallies. About $8 billion in immediate cuts to domestic programs and foreign aid are offset by nearly equal increases in defense spending. When war funding is factored in the legislation would actually increase total federal outlays by $3.3 billion relative to current levels.

In addition, cuts to mandatory benefit programs, while producing no deficit savings, can be claimed under budget rules to pay for spending increases elsewhere in the legislation. All told, $17.8 billion in such savings is claimed, but just a tiny portion of it would actually reduce the deficit.

The study fueled concerns on the Republican side. Freshman Rep. Tim Huelskamp, a Republican from Kansas, had raised alarm about the 2011 savings estimate Wednesday, saying the budget deal is built on "phantom savings." He planned to vote against the package.

A number of House Democrats also complained that the bill cut too much, and a split in leadership appeared in Thursday's vote. House Democratic Whip Steny Hoyer, D-Md., voted for the package, but Democratic Leader Nancy Pelosi, D-Calif., opposed it.

The Associated Press contributed to this report.