U.S. President Joe Biden on Friday praised Congress for its last-minute passage of legislation to raise the government's borrowing limit, describing it as a "crisis averted" in his first address to the nation from the Oval Office.

Biden said he will sign the bill into law on Saturday, pointing out that "passing this budget agreement was critical. The stakes could not have been higher."

His speech from the most formal of presidential settings came before the so-called "X-date" on Monday, when the Treasury Department had warned the United States would run out of money to pay all of its bills on time.

U.S. President Joe Biden gives an address in the Oval Office of the White House in Washington on June 2, 2023. (Getty/Kyodo)

Hailing the consensus Democrats and Republicans eventually reached after knife-edge negotiations, he said, "No one got everything they wanted but the American people got what they needed."

"We averted an economic crisis and an economic collapse," said the Democratic president, who is running for re-election in 2024.

The passage of the bill this week in both chambers of Congress will suspend the $31.4 trillion debt ceiling through Jan. 1, 2025, enabling the federal government to continue borrowing money while requiring it to cap spending that is not associated with veterans or national defense for the same two-year period.

The 99-page bill, based on a deal struck by Biden and House Speaker Kevin McCarthy over the weekend, takes the threat of default off the table until after the November 2024 presidential election.

The package also expands work requirements for some receiving food aid benefits and claws back unspent COVID-19 relief funds.

Related coverage:

U.S. Senate OKs debt ceiling bill, sends it to Biden for signature

U.S. House passes debt limit bill days before possible default