WASHINGTON — Congressional leaders and the White House have reached agreement on a massive year-end tax and spending package, House Speaker Paul Ryan told GOP lawmakers late Tuesday, urging support for the legislation that delivers GOP wins but also includes many Democratic priorities.

The package would fund the government through the 2016 budget year, raise domestic and defense spending, and increase the deficit by hundreds of billions of dollars by extending numerous popular tax credits without paying for them. It lifts the 40-year-old ban on exporting U.S. crude, a long-sought GOP goal that Republicans pointed to as their top win, and delays or suspends several taxes meant to pay for President Obama’s health care law.

Democrats won five-year extensions of wind and solar credits and a permanent extension of the child care tax credit, and beat back many GOP attempts to add favored policy provisions to the bill, including several aimed at rolling back Obama environmental regulations.

“This is divided government,” Rep. John Kline, R-Minn., said coming out of the meeting. “If you’re going to move forward and follow Speaker Ryan’s notion that we move onto offense next year … Let’s put 2015 behind us and move onto 2016.”

Ryan “said that in a divided government you’re going to have some concessions, that’s what compromise is about,” added Rep. Reid Ribble of Wisconsin.

Democratic aides cautioned final language was still being reviewed.

Republican leaders predicted the package would come to a vote in the House and Senate on Thursday, allowing lawmakers to head home for the holidays having completed their needed tasks. First they will have to pass yet another short-term government funding extension, since the current one runs out Wednesday at midnight.

“In negotiations like this you win some, you lose some,” Ryan, R-Wis., said earlier in the day at an event hosted by Politico. “Democrats won some, they lost some. We won some, we lost some.”

Eleventh-hour negotiations twisted and turned on the mammoth deal pairing the $1.1 trillion government-wide spending legislation with a giant tax bill catering to any number of special interests. The deal, Congress’ last major piece of unfinished business for the year, became the vehicle for countless long-sought priorities and odds and ends, including reform of visa-free travel to the U.S. and extensions of health benefits and compensation for 9/11 first responders.

Ryan himself has described the process around the sprawling spending bill as a “crap sandwich,” and his announcement of a deal happened simultaneously with a GOP presidential debate that drew far more attention.

Democrats, despite their minority party status in Congress, exacted a steep price in the negotiations, thanks to Obama’s veto pen and Republicans’ need for their votes on the spending bill. “We may not be in the majority but we’re feeling that these goals are on track,” boasted Sen. Chuck Schumer, D-N.Y.

The final package ignored conservative demands for language clamping down on Syrian refugees entering the U.S. Instead it contains bipartisan changes tightening up the “visa waiver” program that allows visa-free travel to the U.S. for citizens of 38 countries, including France and Belgium.