The U.S. Senate approved a bipartisan bill to suspend the government's borrowing limit late Thursday, sending the legislation to President Joe Biden for his signature and averting an economically disastrous default.

The passage came a day after the House of Representatives, narrowly controlled by Republicans, voted 314-117 ahead of the so-called "X-date" on Monday, when the Treasury Department had said it would run out of money to pay all of its bills on time.

File photo taken in May 2023 shows the U.S. Capitol in Washington. (Kyodo)

Biden thanked senators from both parties for endorsing the bill. In a statement, he said, "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."

The Democratic president said he will address the American people directly on Friday after signing the bill into law and suspend the $31.4 trillion limit through Jan. 1, 2025.

In the upper chamber, the bill was passed by 63 votes to 36. After weeks of tense negotiations, the passage will enable 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 people receiving food aid benefits and claws back unspent COVID-19 relief funds.

Related coverage:

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

Nikkei ends at new 33-yr high on U.S. debt ceiling deal, weak yen