The United States averted the first default in its history after the Senate announced an eleventh-hour compromise deal to re-open the government and raise the debt ceiling until early next year.
The short-term fix arrived only hours before today's deadline to raise the country's borrowing limit – apparently just in time to end a damaging budget stand-off that threatened to have catastrophic consequences for the global economy.
The Dow Jones surged 200 points after it emerged that a deal had finally been reached, 16 days after a federal government shutdown that saw several hundred thousand US government workers put on temporary unpaid leave.
The agreement put Congress in a race against time last night to pass the deal through the Republican-controlled House of Representatives in order to allow President Barack Obama to sign it into law before midnight today.
If passed, it represents a clear political victory for Mr Obama who had refused to give into demands from Tea Party Republicans to roll back parts of his signature healthcare reforms, known as Obamacare, in exchange for re-opening the government.
However, the White House was careful not to gloat over its victory, particular before the deal had passed through Congress.
"There are no winners here. We said that from the beginning, and we're going to say it right up to the end because it's true. The American people have paid a price for this," said Jay Carney, the White House spokesman. "The economy has suffered because of it, and it was wholly unnecessary."
Harry Reid, the Democrat majority leader in the Senate, tried to be magnanimous as he announced the hard-won deal, striking a bipartisan tone as he called for a period of reconciliation between the warring parties.
"After weeks spent facing off across a partisan divide that often seemed too wide to cross, our country came to the brink of a disaster," he said.
"But in the end, political adversaries set aside their differences and disagreements to prevent that disaster."
Mitch McConnell, the top Republican in the Senate who has been forced to contend with 'no compromise' Tea Party members of his own ranks, led by the freshman Texas senator Ted Cruz, was much more downbeat.
"This is far less than many of us had hoped for, frankly, but it is far better than what some had sought," he said. "Now it's time for Republicans to unite behind other crucial goals."
As part of the deal, Republicans and Democrats are to meet in a bipartisan conference to try and draw up a long-term plan to fix America's finances, with the US national debt predicted to exceed $17 trillion (€12.5 trillion) by early next year.
Fears that Mr Cruz, who is bitterly opposed to the Obamacare reforms, would try to delay the passage of the Senate compromise by launching another of the 24-hour filibusters that bought him to national prominence last month, proved unfounded.
However, he berated the "Washington establishment" for cutting a deal to end the shutdown and commended his Republican colleagues in the House of Representatives who had refused to allow their leader, speaker John Boehner, to compromise for so long. (© Daily Telegraph, London)