President Joe Biden and his Republican opponents have announced they have agreed in principle to raise the US debt ceiling and avert a default.
The president described the agreement as a “compromise”, while House Speaker Kevin McCarthy said it “was worthy of the American people”.
The deal, after weeks of bitter negotiations, still needs to be approved by a divided Congress.
The Treasury has warned the US will run out of money on 5 June without a deal.
The US must borrow money to fund the government because it spends more than it raises in taxes.
In a statement, President Biden described the agreement as a compromise which was good for the country “because it prevents what could have been a catastrophic default and would have led to an economic recession, retirement accounts devastated, and millions of jobs lost”.
Mr McCarthy, for his part, referred to “historic reductions in spending, consequential reforms that will lift people out of poverty into the workforce”.
“There are no new taxes, no new government programs,” he said.
Mr McCarthy added that he planned to finish writing the bill on Sunday, before having a vote in Congress on Wednesday.
But he faces a challenge to push it through the House, where it may be opposed by some diehards among both Republicans and Democrats. On Sunday, Republican Representative Chip Roy of Texas said in a tweet he and some others were “going to try” to stop it passing.
Republicans control the House by 222 to 213, while Democrats control the Senate by 51 to 49.
Mr McCarthy told Fox News on Sunday that more than 95% of House Republicans were very excited about the deal.
A US default would upend the US economy and disrupt global markets.
In the US, the immediate effect would be that the government would quickly run out of funds to pay for welfare benefits and other support programmes, for instance.
Over a long period, the crisis would tip the US economy into recession – and this would result in unemployment rising.
A US recession would have big knock-on effects for many countries around the world, for which the US is a key trading partner – they would not be able to sell to an economy that does not buy as much.
And because the US dollar is the reserve currency of the world, a default would send panic across the world, eventually leading to prices of many commodities rising.