The Senate approved a crucial bipartisan budget agreement early Friday that would avert a government default and end nearly five years of pitched battles between congressional Republicans and the Obama administration over fiscal policy.
The measure, which passed 64 to 35, now goes to the White House, wherePresident Obama has said he will sign it.
“This agreement is a reminder that Washington can still choose to help, rather than hinder, America’s progress,” Mr. Obama said in a statement.
The Senate vote, held in the dead of night, was perhaps a fitting cap to the clashes between Republicans and the White House, which many warned had put the United States on the edge of economic calamity and which, in 2013, forced a 16-day shutdown of the federal government.
Unlike the 2013 fight, in which Republicans ultimately surrendered in trying to force a repeal of Mr. Obama’s health care law, this week’s budget accord was largely a draw.
The deal would increase spending by $80 billion over two years and raise the federal debt ceiling, averting a default that the Treasury had warned would happen early next week. The House approved it on Wednesday with the overwhelming support of Democrats but less than one-third of Republicans backing it.
The measure calls for corresponding budget cuts to avoid increasing the deficit, including reductions in Medicare payments to doctors and other health care providers. It also envisions savings from tighter eligibility requirements and other changes to a Social Security disability program.
Though modest in scope, especially in the context of the nearly $4 trillion annual budget, the accord represents a significant breakthrough.
While Congress must still adopt spending bills for the next two years, the bill will substantially reduce the risk of a government shutdown by setting spending targets for two years and allowing Congress to return to its regular appropriations process.
It will also allow the newly installed House speaker, Representative Paul D. Ryan of Wisconsin, a clean start in which he can focus on mending deep divisions among House Republicans.
Senate leaders in each party had expressed support for the measure.
“This agreement isn’t perfect,” the majority leader, Mitch McConnell of Kentucky, said in a floor speech. “I share some concerns other colleagues have raised. But here’s the bottom line: This is a fully offset agreement that rejects tax hikes, secures long-term savings through entitlement reforms and provides increased support for our military — all this at a time when we confront threats in multiple theaters.”
Mr. McConnell added, “I hope senators will join me in voting for it.” Enough did.
But some of his fellow Republican senators, including three presidential candidates — Rand Paul of Kentucky, Ted Cruz of Texas and Marco Rubio of Florida — were fiercely opposed. The rare overnight voting, beginning with a 1 a.m. procedural measure and ending with final passage shortly after 3 a.m., was a consequence of the bitter disagreement among Republicans. In the end, 18 Republicans joined Democrats in supporting final passage, while all 35 no votes came from Republicans.
The critics said that many of the cuts were gimmicks and that the package over all would add to the nation’s debt.
They also said it would breach spending caps they considered a much-needed step toward responsible cost controls. Democrats have long called for lifting the caps, which they say have hurt the economy and blocked needed investments in infrastructure and other programs.
“Ultimately, there was something passed called sequestration, which put caps on both military and domestic spending, and it did slow down the rate of growth of government for a little while,” Mr. Paul said in a speech. “This is the problem with Congress. Congress will occasionally do something in the right direction, and then they take one step forward and two steps back.”
Senator James Lankford, Republican of Oklahoma, said people in his state did not buy arguments for the budget accord. “It was announced by the White House today that this is a great job-creating achievement,” he said, “but all they see is more spending and no change in the status quo.”
Mr. Lankford criticized two of the spending cuts as illusions. One, he said, would slightly move up the due date of pension insurance premiums to the federal government. That would allow the money to be captured within the 10-year window used for budget-scoring purposes.
“Yes, it adds $2.3 billion into the 10-year window,” he said. “It’s actually zero savings. It’s not real. They moved a payment a month and said it’s a pay-for. It’s not a pay-for.”
Mr. Lankford said another part of the plan would divert $1.5 billion from a fund to compensate crime victims. “Apparently, this budget agreement qualifies, though, as a victim of crime, because $1.5 billion is taken from the Crime Victims Fund and dedicated not to victims of crime but to spending in other areas,” he said.
Supporters of the measure said it represented a true bipartisan compromise in that neither side was fully satisfied.
The Senate Democratic leader, Harry Reid of Nevada, applauded the passage of the bill.
“Today’s vote is a victory for bipartisanship and for the American people,” Mr. Reid said in a statement after the vote. “Together, Democrats and Republicans have proven that, when partisan agendas are set aside, we can find common ground for the common good.”