Congressional negotiators struck a two-year budget deal late Monday night that would increase federal spending by $80 billion and protect the nation from a debt default through the end of the Obama presidency. The 144-page agreement was posted shortly before midnight, setting up a vote in the House on Wednesday as Speaker John Boehner tries to rush the bill through Congress before the expected election of Paul Ryan on Thursday. Passage of the proposal would raise the debt limit through March 2017, although lawmakers would still have to pass a separate omnibus spending bill by December 10 to avert a government shutdown. The Treasury Department has said Congress must approve new borrowing authority by November 3 to avoid an unprecedented default. The deal is the most significant fiscal agreement in Congress in two years and would fulfill Boehner’s desire to “clean the barn up” for his successor. Meeting demands from Obama and congressional Republicans, spending would increase by an equal amount for defense and domestic programs, relaxing the caps under “sequestration” enacted in 2011. But the deal also pushes harder decisions down the road, since it extends spending limits by another two years until 2025. The spending increases would also be offset by changes to the crop insurance program and by allowing the government to make automated calls to cell phones to collect debts. And it would raise money through the sale of oil from the Strategic Petroleum Reserve. The bill cancels $1.5 billion from the Justice Department’s crime victims fund and nearly $750 million from the assets forfeiture fund.

Democrats won changes to Medicare that would protect millions of seniors from premium increases, while Republicans secured changes to the Social Security Disability Insurance program that they say would save $168 billion over 10 years while preventing immediate benefit cuts. That provision is likely to cause concern among liberals who oppose any alteration to Social Security that does not expand benefits for recipients. Seeking to head off those worries, Nancy Pelosi, the House Democratic leader, quickly praised the agreement and said it “represents real progress for hard-working families.” The changes to Social Security, she said, would “extend the solvency” of the insurance fund. Republicans also secured the repeal of another provision in Obamacare that requires large businesses to automatically re-enroll employees in a healthcare plan. As expected, conservative groups immediately panned what they called a “zombie budget deal.” “This budget and debt deal is being brokered by a lame duck speaker and a lame duck president,” the leaders of Club for Growth and Heritage Action said in a joint statement. “It represents the very worst of Washington—a last minute deal that increases spending and debt under the auspices of fiscal responsibility.” October 26, 2015, 3:55 p.m. John Boehner might get to “clean the barn up” before he leaves, after all. The departing speaker and Democratic negotiators are closing in on a fiscal agreement that would bring budget peace—and more federal spending—to Washington for the remainder of the Obama presidency while staving off the possibility of a debt default through March 2017, according to a senior congressional official briefed on the talks. The deal could still fall through, but party leaders hope to complete it Monday night so that the House could vote by Wednesday, just a day before Boehner is expected to hand his speaker’s gavel to Paul Ryan. And in a sign of optimism, House Republicans called an emergency meeting of the conference for Monday evening to discuss the talks. If completed, the agreement would be the most significant spending accord in two years and perhaps since 2011, when the White House and congressional Republicans enacted deep spending cuts in exchange for an increase in the debt ceiling. Obama and some Republicans have been trying to undo part of those cuts, known as sequestration, ever since—GOP defense hawks want to lift budget caps for the Pentagon, while the president has refused to do so unless he can get an equivalent increase in domestic spending. Under the emerging agreement, that’s what would happen. Money for defense and non-defense accounts would go up by about $50 billion this year and another $30 billion in fiscal 2017, according to Politico. The deal would also prevent steep premium increases for millions of Medicare beneficiaries, the House official said, in a win for Democratic negotiators. (The official spoke on condition of anonymity, because the negotiations are ongoing.) CNN is reportingthat the spending increases would be offset by oil sales from the Strategic Petroleum Reserve, higher fees for telecommunications companies, and changes to the crop insurance program.