The Democratic-controlled US House of Representatives gave final approval on Tuesday to a bill temporarily raising the government's borrowing limit to $28.9 trillion, avoiding the risk of default at least until early December.
Democrats, who narrowly control the House, maintained party discipline to pass the hard-fought, $480 billion debt limit increase by 219-206.
The vote was along party lines, with every yes from Democrats and every no from Republicans.
US President Joe Biden is expected to sign the measure into law this week, before October 18, when the Treasury Department has estimated it would no longer be able to pay the nation's debts without congressional action.
"We have temporarily averted crisis ahead of next week’s deadline, but come December, members of Congress will need to choose to put country before party and prevent default," said Democratic Representative Richard Neal, chairman of the House Ways and Means committee.
Republicans insist Democrats should take responsibility for raising the debt limit because they want to spend trillions of dollars to expand social programmes and tackle climate change.
Democrats say the increased borrowing authority is needed largely to cover the cost of tax cuts and spending programmes during former president Donald Trump's administration, which House Republicans supported.
House passage warded off concerns that the US, the world's largest economy, would go into default for the first time, but only for about seven weeks, setting the stage for continued fighting between the parties.
Senate Republican leader Mitch McConnell wrote to Mr Biden on Friday that he would not work with Democrats on another debt limit increase.
The months-long fight over the limit is closely tied to the November 2022 congressional elections, when Republicans are trying to gain majorities in the House and Senate.
Mr McConnell was harshly criticised by Mr Trump, the Republican party's leader, after the Senate vote.
Legislators also have only until December 3 to pass spending legislation and prevent a government shutdown.
More partisan fighting head
House Speaker Nancy Pelosi said she hoped there could be a future bipartisan solution to the debt ceiling issue, despite McConnell's warning.
Ms Pelosi said a Democratic proposal to allow the Treasury Department to lift the debt ceiling, with Congress having the ability to overrule it, "has merit".
She repeated that Democrats did not want to use a procedural manoeuvre called "reconciliation" to raise the ceiling.
Reconciliation would let the Democrats raise the ceiling with 51 votes rather than the 60 required under the Senate's filibuster rule, if Republicans continue to refused to co-operate.
The Senate's vote last week to raise the debt limit, which had been more routine before the current era of fierce partisanship, turned into a brawl.
Republicans tried to link the measure to Mr Biden's goal of passing multitrillion-dollar legislation to bolster infrastructure and social services while fighting climate change.
Ms Pelosi said she was optimistic that Democrats could work out changes to reduce the cost of their social policy plans "in a timely fashion".
Asked if Democrats could do this by October 31, she repeated that she was "optimistic".
The Senate passed the bill raising the debt limit with votes from every Democrat, after 11 of the 50 Republicans agreed not to try to block the vote.
During the Trump administration, the debt limit was raised three times with the support of Democrats, despite their uniform opposition to Republican initiatives that added to government debt.
They included tax-cut legislation in 2017 and Mr Trump's priorities, such as building a south-west border wall to keep out immigrants, all of which increased the deficit.
At one point, Mr Trump walked out of negotiations with Democrats, refusing to discuss a shutdown and calling the meetings to reach a compromise a "total waste of time".
Mr Biden, quietly and with little fanfare, defunded remaining portions of Mr Trump's legacy border wall last week.
Reuters contributed to this report