WASHINGTON (AFP) - US senators scrambled together an eleventh hour compromise on Wednesday that they hoped might protect Washington's battered financial standing by heading off fears of a default.
The Senate deal must still pass a divided and unpredictable House of Representatives, but lawmakers were hopeful it will allow the US government to reopen and keep borrowing to meet its obligations.
"I hope that we're nearing the end of this ordeal, this impasse which never should have happened in the first place," said Senator Susan Collins, a Republican who has led efforts to broker a compromise.
At midnight on October 17, the US economy was to sail into uncharted waters where the Treasury would no longer be able to borrow more to meet its obligations and avert a devastating debt default.
The only way to avert this peril, which could send global markets into turmoil and threaten another recession, would be for Congress to agree to raise the US government's US$16.7 trillion debt ceiling.
Senate leaders met to hammer out a compromise, after a previous effort in the Republican-led House collapsed in chaos on Tuesday.
"The America people are tired of where we are," Senator Kelly Ayotte, a Republican, said. "They're tired of the brinksmanship, and so they want us to get this resolved now for them - today, hopefully."
Ms Ayotte and other senators said that they understood that senate leaders had agreed the terms of a deal that could pass, and that it would be sent first to the House.
If it is approved there, it would return to the senate, where lawmakers hope to rapidly pass it into law.
Conservatives from the Tea Party movement in the House have thus far thwarted votes on the debt ceiling and on passing a budget, demanding concessions from President Barack Obama.
Mr Obama's Democrats have refused to allow Republicans to hold the budget and debt ceiling votes to "ransom" with attempts to defund or delay the president's landmark Obamacare health insurance reform.
The stand-off has forced the US federal government into a partial shutdown, and if it continues past midnight it would put the United States in a position where it might not be able to pay its debts.
Markets have been watching the mess carefully, but have not panicked, most traders assuming that Washington will scrape together a deal before triggering global financial calamity.
US stocks surged as soon as reports began coming out from the Senate on the prospective deal.