WASHINGTON — The White House and lawmakers of both parties grudgingly embraced a massive government-wide 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 sprawling package will keep federal agencies funded through Sept. 30 of next year, 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 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 President 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 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.