Senate leaders took command of efforts to avert a US Treasury default and end the partial government shutdown last night after a last big effort by Republicans abruptly collapsed.
Meanwhile a top ratings firm warned of a possible downgrade in the country's creditworthiness.
Aides to both Senate Majority Leader Harry Reid and the Republican leader, Mitch McConnell, expressed revived optimism about chances for a swift agreement - by today at the latest - that could pass both houses of Congress.
Their efforts toward a bipartisan resolution had seemed likely to bear fruit a day earlier before House of Representative conservatives were given a last-minute chance for their version.
As hours ticked down toward a Treasury deadline, the likeliest compromise included renewed authority for the Treasury to borrow until early February and the government to reopen at least until mid-January.
While a day of secret meetings and frenzied manoeuvring unfolded in all corners of the Capitol, Democratic Senator Barbara Mikulski stood on the Senate floor and declared that the US was "hours away from becoming a deadbeat nation, not paying its bills to its own people and other creditors".
In New York, the Fitch rating agency warned that it was reviewing the government's AAA credit rating for a possible downgrade, though no action was near.
The firm, one of the three leading US credit-ratings agencies, said that "the political brinkmanship and reduced financing flexibility could increase the risk of a US default".
The New York Stock Exchange fell 133 points after rising a day earlier when optimism spread that a deal might be at hand.
According to Treasury Secretary Jacob Lew, unless Congress acts by tomorrow, the government will lose its ability to borrow and will be required to meet its obligations relying only on cash on hand and incoming tax receipts.
President Barack Obama and other officials in government and finance have warned of severe economic consequences if federal obligations come due that cannot be paid.
By all accounts, however, an end seemed near for the impasse that has once again exposed a government so divided that it sometimes borders on dysfunction.
Though the House failed to muster sufficient support for a conservatives-only bill in the Republican-majority chamber yesterday, enough Republicans there seem likely to join House Democrats to approve a bipartisan version if it can be approved by the Senate and sent to them.
Politically, neither party is faring well, but polls indicate Republicans are bearing the brunt of public unhappiness reflected in plunging approval ratings.
Congress is trying to pass two measures that are normally routine: A temporary funding bill to keep the government running and legislation to raise the borrowing limit.
The measure unveiled by House Republican officials would have permitted the Treasury to borrow normally until February 7 and the government to reopen with sufficient funds to carry it to December 15.
But within a few hours, objections came from all corners of the rank and file. And Heritage Action, a group with ties to the hardcore conservative tea party movement, announced its opposition to the measure.
That verdict came after Republicans axed two provisions that had drawn objections from the White House and Democrats.
One would have delayed a medical device tax created to help fund the new health care law known as "Obamacare".
The other would have imposed tougher income verification standards on individuals and families seeking subsidies for purchasing health insurance under the law.
Democrats had viewed both as concessions to Republicans, and deemed their inclusion as a violation of Mr Obama's vow not to pay a "ransom" to the Republicans for passing essential funding and borrowing measures.
The partial shutdown began on October 1 after House Republicans refused to accept a temporary funding measure to provide the money to run the government unless Mr Obama agreed to defund or delay his signature health care reform.
House Republicans also refused to move on needed approval for raising the amount of money the Treasury can borrow to pay the nation's bills.
The hard-right tea party faction of Republicans in the House has seen both deadlines as a weapon to get their way on gutting the health care overhaul, designed to provide tens of millions of uninsured Americans with coverage.
The White House refused to abandon Mr Obama's key legislative achievement, and the Democratic-controlled Senate rejected legislation to achieve the Republicans' goal.
The partial government shutdown has affected 350,000 federal workers.