The House passed a sweeping bipartisan budget deal negotiated by party leaders and the White House Wednesday, angering some conservative House Republicans.

The deal passed 266-167 with the support of just 79 Republicans and every Democrat who voted. It lifts the debt ceiling until March, 2017, preventing a potentially disastrous default on U.S. debt the Treasury Department warned was just days away, and putting a temporary end to constant fiscal cliffs.

Republican Rep. Paul Ryan ‘s expected new role as Speaker of the House will be a lot easier as a result of the deal, which was one of Speaker John Boehner ‘s final tasks before he steps down Friday. Ryan supported the bill, but it drew sharp criticism from conservatives for its content and the way it was negotiated by a few members behind closed doors.

“Just in time for Halloween, this legislation is more trick than treat, with phantom savings and a truly terrifying $85 billion in new spending in the first three years,” said Republican Rep. Peter Roskam . “It was put together behind closed doors and once again puts today’s problems off until tomorrow.”

The deal lifts both domestic and defense spending caps put in place by the 2011 sequester cuts by $112 billion, including a $32 billion increase to the Overseas Contingency Fund used for U.S. interventions abroad. Caps on both domestic and defense spending would increase by $50 billion in 2016 and $30 billion in 2017.

Spending costs would be fully offset, according to a Congressional Budget Office report released Wednesday. Social Security reforms and a 2 percent cut in Medicare would be extended to offset the spending increase. Revenue gained from the sale of 58 million barrels of oil from the Strategic Petroleum Reserve between 2018 and 2025 would also offset costs.

The Senate is expected to take up and pass the bill later this week.

Follow Juliegrace Brufke on Twitter