In the midst of a divided government in Washington, D.C., President Biden signed legislation on Saturday to raise the debt ceiling through 2025 and prevent a default.

Just days before Treasury officials issued a warning that the department would run out of money to pay the country’s obligations, possibly causing a recession and damaging the economy, the president signed the law.

Along with lifting the debt ceiling, the plan also sets spending limits, pulls back COVID-19 relief monies that were not used, establishes job restrictions for some people receiving government aid, and cancels some of the financing the IRS received under last year’s Inflation Reduction Act.

The package does not, however, add any new work requirements for Medicaid enrollees and maintains intact several Democratic initiatives passed during the previous Congress.

On a 63-36 bipartisan vote on Thursday night, the Senate approved the bill. Similar bipartisan support helped the proposal clear the House a day earlier, 314-117.

Both party members and independents found things about the law to dislike. Progressive Democrats were particularly unhappy with the extra labor requirements, while many conservative Republicans felt the accord did not go far enough in reducing government spending.

Weeks of discussions between Biden and Speaker Kevin McCarthy (R-Calif.) and their teams resulted in the legislation.

Biden and other senators seeking reelection will be granted a break if the debt ceiling debate is postponed until after the 2024 election because a default is no longer a threat.

For months, Biden and his team had steadfastly maintained there would be no debt ceiling discussions. In the end, the White House agreed to get down and discuss, but they insisted it was about the budget and not the debt ceiling.

Allies of the White House praised the agreement as more proof of Biden’s ability to compromise while ensuring the protection of his priorities, drawing a contrast with leading GOP contenders who frequently attack Democratic rivals and show little interest in working across the aisle.