WASHINGTON - The White House and lawmakers of both parties grudgingly embraced a massive governmentwide budget deal Wednesday combining more than a trillion dollars in year-end spending with hundreds of billions in tax cuts for businesses, families and special interests of every kind. Leaders planned to push it to final passage by week's end and quickly adjourn for the holidays, ending a tumultuous year on Capitol Hill.

The package will keep federal agencies funded through Sept. 30, staving off a government shutdown that was to begin next Tuesday at midnight under the latest in a series of short-term spending bills, this one passed by Congress and signed by President Obama on Wednesday.

"In divided government, you don't get everything you want," new House Speaker Paul Ryan said of the 2,200-page melange of wins and losses for both parties. "I think everybody can point to something that gives them a reason to be in favor of both of these bills."

At the White House, press secretary Josh Earnest sounded a similar note, saying Obama would sign the package despite elements opposed by the administration. Those include a GOP provision lifting the 40-year-old ban on exporting crude oil from the U.S. and delays and suspensions of several taxes to pay for Obama's health-care law.

"The president is pleased with the final product, even if it does reflect the kind of compromise that's necessary when you have a Democratic president negotiating with large majorities of Republicans," Earnest said.

Indeed, few ringing endorsements could be heard from either side for the sprawling package.

Despite pledges by Ryan to run a different kind of House after his predecessor, John A. Boehner, was ousted by conservatives angered over last-minute, dead-of-night compromises with Democrats, the new GOP speaker found himself asking lawmakers to endorse a huge, eleventh-hour deal of his own. It's stuffed with special-interest goodies, presents for powerful lawmakers, and provisions of obscure origin benefiting everyone from race car owners and many others.

He pledged to do better next year. And most Republican lawmakers appeared happy to give him the benefit of the doubt and say goodbye to a roller coaster of a year that included a near-shutdown of the Homeland Security Department and Boehner's chaotic ouster.

"There's a whole variety of things in there I define as very positive," GOP Rep. Frank Lucas of Oklahoma said after emerging from a closed-door meeting where Ryan pitched the deal. "Let the other side spin it however they want. I think the votes come together to pass it, and I get to go to my mother-in-law's Saturday morning."

Senate Minority Leader Harry Reid (D., Nev.) called the package "a good compromise."

After years of trying, Republicans claimed wins by making permanent business tax breaks for research and development and for buying new equipment.

Democrats got permanent extensions of tax credits for college costs, children, and lower-income families. In exchange for lifting the oil ban, they won five-year extensions of solar and wind energy production credits plus a renewal of a land and water conservation fund.