The White House had vowed to block the National Defense Authorization Act of 2016, saying the president opposes its mechanism for letting the military get around budget caps to add about $89.2 billion in defense spending.
The Senate voted 73 to 26 to prevent a filibuster of the measure, all but guaranteeing it will pass later this week. The bill has already passed the House, meaning Senate passage will force Obama to decide whether to issue just the fifth veto of his presidency.
The provision the White House opposes shifts billions to a category called Overseas Contingency Operations -- an account that is intended to deal with unforeseen military emergencies by letting the Defense Department tack such war costs onto the deficit.
Obama and top Senate Democrats opposed to the bill said they would not support such a move when the broader budget fails to deal equally with domestic programs, which remain under the stringent caps passed by Congress in 2011 as part of the infamous sequestration plan in that year's Budget Control Act.
The idea behind the sequestration caps was to ensure that domestic and military programs felt the budgetary pain equally, noted Sen. Jack Reed (D-R.I.), the top Democrat on the Senate Armed Services Committee. He added that the point of OCO was to give the military flexibility for emergencies, not fund its regular operations with ad hoc infusions.
"To suddenly ignore the true purpose of OCO and treat it as a budgetary gambit in order to skirt the BCA caps is, in my view, an unacceptable use of this important tool for our war fighters in the field," Reed said during Senate floor debate before the vote, echoing his previous statements.
Republicans countered that Democrats who voted against the NDAA on the grounds that other programs don't also benefit were doing so for selfish reasons that essentially put them on the side of Iran.
"Why are Democrats opposing a bill that would authorize the funding that our troops need to operate?" asked Sen. John Thune (R-S.D.). "Democrats have decided that since they can't get everything they want, they're going to take their ball and go home."
And like House Speaker John Boehner (R-Ohio), Thune suggested the president and Democrats were doing better for terrorists than American soldiers.
"While President Obama is threatening to veto a bill that funds our armed forces, he has agreed to a deal with Iran that gives Iran access to over $100 billion to fund terrorism," Thune said. "Now, above all in the wake of this Iran deal and growing chaos in the Middle East, holding up funding for our troops by blocking this authorization bill is unacceptable."
Thune also noted the bill posed a problem for many Democrats who had voted for it in June when it first came up.
"It's pretty hard to explain why you think a bill is good one day and not the next," Thune said.
While more than a dozen Democrats stayed with their previous vote and opposed Obama, Senate Minority Leader Harry Reid (D-Nev.) pledged it would be a different story if Obama makes good on his threat and sends the bill back.
"Our Democrats have stated without any question, that if it comes time to sustain a presidential veto, that will be done,” Reid said.
It requires 67 votes in the Senate to override a veto, six fewer than the number of votes for the bill Tuesday. Reid pointed out that Democrats were more united in the House, where there were not enough votes last week to be able to override the president.
Michael McAuliff covers Congress and politics for The Huffington Post. Talk to him on Facebook.