US President Joe Biden on Saturday signed a bill to raise the debt ceiling into law, the White House said.
The signing of the Fiscal Responsibility Act suspends the debt limit to renew borrowing and avoid a default that would have likely had damaging implications for the American and global economies.
The bipartisan deal came after months of political wrangling.
Senate approves bill earlier in the week
The Senate earlier this week passed the bill to raise the debt ceiling and cap government spending for the next two years.
The nation's debt currently stands at around $31 trillion (€29 trillion), which Republicans say is unsustainable.
Republicans, who currently enjoy a majority in the House of Representatives, had refused to raise the debt ceiling unless Biden and the Democrats agreed to federal spending cuts.
Reaching a deal to cut spending
But Biden and House Speaker Kevin McCarthy managed to reach an agreement, giving Republicans some of their demanded federal spending cuts but holding the line on major Democratic priorities.
The deal raises the debt limit until 2025 and gives legislators budget targets for the next two years, in hopes of assuring fiscal stability as the political season heats up.
The US Treasury Department had earlier warned that if the debt ceiling wasn't raised beyond Monday, the US government could run out of money and default on its $31 trillion debt.
A default would have likely triggered market panic, a recession and millions of job losses, with global implications.
"Nothing would have been more catastrophic," Biden said, in the context of approaching the debt default deadline of June 5.