Republican and Democratic leaders of the US Senate have struck a cross-party deal to end a partial government shutdown and raise the US debt limit.
Their bill must also pass the House, where a small group of Republicans are expected to join Democrats to send the bill to President Barack Obama.
The bill which extends the federal borrowing limit until February 7 and funds the government to 15 January, comes just a day before the deadline to raise the $16.7tn (¬£10.5tn) limit.
On the floor of the US Senate, Democratic leader Harry Reid called the legislation “historic”, saying it would provide time for Congress to work toward a long-term budget agreement.
The plan would create a conference committee of Senate and House members tasked with drawing up a longer-term budget deal.
“Our country came to the brink of disaster,” Mr Reid said. “This legislation ends a stand-off that ground the work of Washington to a halt.”
Republican Senate Minority Leader Mitch McConnell, Mr Reid’s negotiating partner, said he was “confident” the government would reopen and avoid default under the proposed bill.
The deal “is far less than many of us hoped for, quite frankly, but far better than what some had fought,” he said.
“Now it’s time for Republicans to unite behind other crucial goals.”
Politicians, bankers and economists warned of global economic consequences unless an agreement to raise the US government’s borrowing limit were reached.
The US Treasury has been using what it has called “extraordinary measures” to pay its bills since the nation reached its current debt limit in May.
Those methods will be exhausted by 17 October, US Treasury Secretary Jack Lew has said, leaving the US unable to meet all of its debt and other fiscal obligations if the limit is not raised.
It remains unclear whether the Senate bill can muster enough votes in the Republican-led House to pass before the 17 October deadline.
The House Democratic caucus may be joined by a smaller number of more moderate Republicans, analysts say.
White House press secretary Jay Carney told reporters US President Barack Obama hopes both chambers of Congress “will move swiftly” to pass the Senate agreement.
Asked if the bill, which contained few concessions to Republicans, represented a win for the Obama administration, Carney said “there were no winners here”.
“The economy has suffered… The American people have paid a price for this.”
Hardline conservatives triggered the budget warfare 16 days ago, forcing the first government shutdown in 17 years by demanding that Mr Obama gut his signature healthcare overhaul plan.
An estimated 700,000 of the 2.1 million-strong federal workforce were initially told to stay home, having been deemed “non-essential” staff.
Most national parks, museums, federal buildings and services were closed, while pension and military veterans’ benefit cheques were delayed.
Although both parties have fared badly in opinion polls during the political stand-off, Republicans have taken the brunt of the blame from voters.