The US Senate has passed a bipartisan, two-year budget deal that boosts federal spending by US$80 billion, reduces a government shutdown threat and raises the debt ceiling.
The bill, which passed the House of Representatives on Wednesday (local time), now goes to US President Barack Obama for the formalities of his signature.
The measure, which passed 64 votes to 35, provides Congress with some fiscal breathing room through the 2016 presidential election after years of bruising spending fights.
The plan extends federal borrowing authority through March 2017 and averts a damaging default.
It provides for roughly equal increases on spending for defence and for domestic programs. It also adds US$32 billion into an emergency war fund for the Pentagon, offset by tweaks to entitlement programs including Social Security.
The deal is the result of weeks of secret negotiations between the White House and then-speaker John Boehner, who sought to clear the decks of any fiscal crises before his successor took the gavel.
Boehner stepped down on Thursday, when congressman Paul Ryan was elected as his successor, and the bill marked Boehner's final legislative achievement.
There was a sense of urgency to the Senate vote, which occurred hours before sunrise on Friday.
Congress must raise the federal borrowing limit by November 3 or risk Washington ending up in default.
Senate Minority Leader Harry Reid praised Republicans and Democrats for coming together to pass the bill, which he said "will help prevent a government shutdown and avoid a disastrous default on our nation's obligations".
Several conservatives, including a number of candidates vying for the Republican presidential nomination, have blasted the deal as fiscal recklessness.
Critics say it marks a sell-out to the Obama administration because it busts through congressionally mandated spending caps and extends borrowing authority, while doing little to pare down the nation's US$18 trillion deficit.