The US Senate has voted to temporarily raise the nation's debt limit, avoiding a historic default that experts say would have devastated the economy.
Senators agreed to increase the limit by $480bn (£352bn), which will cover the US until early December.
The bill was approved in a 50-48 vote, following weeks of partisan fighting.
The breakthrough came less than two weeks before the US was set to be unable to borrow money or pay off loans for the first time ever.
The bill now has to be approved by the House of Representatives, and will then be sent to President Joe Biden to be signed into law.
The vote in the upper house of Congress came after Republican Senate leader Mitch McConnell offered his support for a short-term extension.
Senate Republicans have previously said that raising the debt limit is the "sole responsibility" of Democrats because they hold power in the White House and both chambers of Congress.
They are frustrated by new spending proposals the Democrats are trying to push through without Republican support, and Mr McConnell tweeted last month that his party would "not facilitate another reckless, partisan taxing and spending spree".
Speaking after the vote, the Democrats' Senate Majority leader Chuck Schumer said Republicans had "played a dangerous and risky partisan game".
"What is needed now is a long-term solution so we don't go through this risky drama every few months," he added.
But several senior Republicans attacked Mr McConnell's decision to strike a deal with Mr Schumer. South Carolina Senator Lindsey Graham called the move "a complete capitulation".
US lawmakers will still have to address this issue near the new December deadline to avert a default.
If the US defaults on debts, experts say it will severely hurt the country's credit rating, plunge the global financial system into turmoil, and possibly lead to a self-inflicted recession.

What is the debt ceiling?
The US government spends more money than it collects in taxes, so it borrows to make up for the shortfall.
Borrowing is done via the US Treasury, through the issuing of bonds. US government bonds are seen as among the world's safest and most reliable investments.
In 1939, Congress established an aggregate limit or "ceiling" on how much debt the government could accumulate.
The ceiling has been lifted on more than 100 occasions to allow the government to borrow more. Congress often acts on it in a bipartisan manner and it is rarely the subject of a political standoff.
But some Republicans have voiced frustration about new Democrat spending proposals.
Democrats have pointed out that raising the debt ceiling is about paying off existing obligations rather than paying for new ones, and that President Biden's policies have only contributed to 3% of existing debts.
Latest Stories
-
These companies will raise prices because of Trump’s tariffs
7 minutes -
UNTWO election: PABF urges Africa to back UAE’s Al Nowais bid to be first Secretary-General
18 minutes -
Two in court over forged Judicial Service documents and stamps
19 minutes -
Black Stars could miss key players for 2025 Unity Cup – Dr Randy Abbey
8 hours -
Pyramids grab late equaliser in African Champions League final
9 hours -
EU calls for ‘respect’ after Trump threatens 50% tariffs
9 hours -
Ronaldo ‘could play’ in Club World Cup – Infantino
9 hours -
Amorim tells Garnacho he can leave Man Utd
9 hours -
Djokovic makes more history with 100th singles title
9 hours -
Ten Hag set to replace Alonso as Leverkusen manager
9 hours -
Salis’ Sunderland secure Premier League return
10 hours -
Assin Fosu chiefs and elders bless TGMA Unsung Artiste of The Year, Yaw Darling
10 hours -
Middle-aged, 2 children trapped in their home after a fig tree sealed their frontage doors
11 hours -
Roots of resistance: The climate cost of cutting Accra’s trees
11 hours -
Reimagining Informality: Harnessing the Urban potential of street vending in Ghana
12 hours