President Barack Obama won passage by the Congress early on Friday of legislation that lifted the threat of a default on government debt through the end of his presidency and a budget blueprint easing strict spending caps through September 2017.
The Senate voted 64-35 to approve the measure, which was negotiated over the past few weeks by the White House and congressional leaders, including newly retired former House Speaker John Boehner.
Obama is expected to sign the bill into law promptly.
Without action by Congress, the Treasury Department would have exhausted the last of its borrowing capacity on Nov. 3, according to Secretary Jack Lew. That, in turn, risked a default on U.S. obligations within days that would roil global financial markets.
The two-year budget provision provides new top-line spending levels for Congress for the fiscal year that began Oct. 1 and the one starting Oct. 1, 2016.
It loosens budget caps, allowing an additional $80 billion in spending on military and domestic programs over the two years.