The Senate voted Thursday night to raise the government’s debt ceiling and cut trillions of dollars in spending, concluding a long and fractious political struggle that pushed the nation to the brink of default.
The bill, which passed 63 to 36 and has already cleared the House, will be signed by President Joe Biden with time to spare before the government’s borrowing authority is set to run out on Monday.
“No one gets everything they want in a negotiation, but make no mistake: this bipartisan agreement is a big win for our economy and the American people,” Biden, who negotiated the framework of the bill with Republican House Speaker Kevin McCarthy, said in a statement immediately after the legislation passed the Senate.
The legislation’s passage came after a day of tense negotiations in the Senate as a handful of Republicans complained that the deal would underfund the military and threatened to delay the vote unless Senate leaders committed to addressing their concerns before voting. Lawmakers on both sides threw up one last set of hurdles by proposing 11 amendments in exchange for allowing the legislation to pass quickly. Adoption of the amendments would have sent the bill back to the House, but each failed.
In the end, Congress once again managed to clean up a fiscal mess of its own making after a long impasse marked by contentious late-night negotiations and partisan bickering. The compromise was denounced by Democrats as being tilted too heavily toward Republican priorities after Biden went back on his vow not to negotiate with opponents who effectively threatened to tank the U.S. economy in order to extract spending cuts.
Read more: Here’s What’s in the Debt Ceiling Bill.
The final roll call vote laid bare political fissures within both parties, with passage in the Senate relying on the votes of the remaining center of each party. Forty-four Democrats, 17 Republicans and 2 Independents voted in favor.
The legislation suspends the debt ceiling through Jan. 2025 and reduces government deficits by about $1.5 trillion over a decade, according to the Congressional Budget Office, by effectively freezing some funding that had been projected to increase next year and then limiting spending to 1% growth in 2025. The bill also increases military spending to $886 billion for next year, a 3% raise, though GOP critics felt the package would not keep pace with inflation and on Thursday afternoon demanded a commitment from Senate leaders to pass a supplemental defense spending bill later this year, as well as pledge to take up all 12 annual appropriations bills as a condition for moving forward quickly.
In a rare joint statement released ahead of the vote, Senate leaders Chuck Schumer and Mitch McConnell agreed to attempt to pass 12 annual spending bills this year in order to avoid the across-the-board spending cuts the debt deal calls for. The agreement paved the way for a quick final vote on the pact. “It does not fix this bill totally, but it is a march in the right direction,” said Sen. Lindsey Graham, the South Carolina Republican who had openly criticized the bill’s military spending provisions. Congress has not passed all 12 appropriations bills in time since 1996.
The legislation also imposes stricter work requirements for food stamps, claws back some funding for Internal Revenue Service (IRS) enforcement and unspent COVID-19 relief money, accelerates the permitting of new energy projects, and officially ends the Biden Administration’s student loan-repayment freeze.
Read More: What the Debt Ceiling Deal Means for Student Loan Borrowers
Not all Democrats were on board. Some progressive members of Congress, including Sens. Elizabeth Warren of Massachusetts and Bernie Sanders of Vermont, were dismayed that the deal imposed new work requirements on people aged 50 to 54 in order to receive food stamps. Others voiced frustration that Biden had to negotiate with McCarthy at all over the debt ceiling, complained that the White House had ignored them in its negotiations with Republicans, and said the deal would do too little to protect programs for the poor.
Biden said he planned to sign the bill into law as soon as possible. Failure to do so by Monday would have left the government without the ability to borrow for the first time in history, forcing a financing crisis that would have tanked markets and jolted the U.S. economy.
More Must-Reads from TIME
- Donald Trump Is TIME's 2024 Person of the Year
- Why We Chose Trump as Person of the Year
- Is Intermittent Fasting Good or Bad for You?
- The 100 Must-Read Books of 2024
- The 20 Best Christmas TV Episodes
- Column: If Optimism Feels Ridiculous Now, Try Hope
- The Future of Climate Action Is Trade Policy
- Merle Bombardieri Is Helping People Make the Baby Decision
Write to Nik Popli at nik.popli@time.com