Over White House objections, the Senate on Thursday passed a $612 billion defense policy bill that calls for arming Ukraine forces, prevents another round of base closures and makes it harder for President Obama to close the prison for terror suspects at Guantanamo Bay, Cuba.

The Senate voted 71-25 to approve the bill, which Obama has threatened to veto.

The bill, which now must be reconciled with the version passed by the House, provides a 2.3 percent pay increase for U.S. servicemen and -women and sets up a system so troops would not have to serve for 20 years before getting some retirement money. It also reaffirms a ban against torturing detainees.

Moments after the overwhelming vote to establish military policy, Democrats blocked a separate bill that provides the actual funds for the Pentagon. The vote was 50-45, 10 short of the necessary votes to move ahead.

Democrats oppose the way the bill skirts congressional spending caps by padding an emergency war-fighting account that is exempt from the caps. They argue that if Republicans want to break through spending caps on defense, they should do so for domestic spending, too.

A brief exchange between the Republican and Democratic leaders underscored the broader budget dispute that is likely to stretch through the summer, up until the Sept. 30 deadline to keep the government operating. It also captured the political gamble by Democrats, who blocked Pentagon money and left senators open to GOP criticism that they were failing to support the military.

"You just voted for the troops, now you're going to vote against them?" Majority Leader Mitch McConnell, R-Ky., asked with a degree of incredulity.

Minority Leader Harry Reid, D-Nev., argued against "doing funny money" on defense and maintained that the GOP was short-changing the FBI and National Institutes of Health.

"There are some who say this is a one-year fix," said Rhode Island Sen. Jack Reed, the committee's ranking Democrat, who voted against the massive bill, some 4 inches thick. "I don't think that's the case at all. I think if we use these types of, as some call, gimmicks, accounting tricks once, our tendency to use them again will be there. Once we've used it once, it is easy to use it two, three, four, five times."

Democrats hope to force Republicans to the negotiating table, a strategy that seems risky. It would put Democrats on the hook for filibustering troop pay, funds for operations in Afghanistan and combating Islamic extremists, and the rest of the Pentagon budget.

Hours before the vote, top Senate Democrats sent McConnell a letter urging him to convene a mini-summit to find a way to match the Pentagon budget boost with increases for domestic programs such as education, infrastructure grants and law enforcement.

"We write to urge you to immediately schedule bipartisan budget negotiations for next week to find a fair, reasonable and responsible path forward for funding key national priorities such as national defense and domestic investments in education, health, science and infrastructure," the Democrats said in the letter. "We are alarmed that you have not displayed a greater sense of urgency to address this problem."

The White House objects to the bill for what Defense Secretary Ash Carter on Wednesday called "herky jerky" budgeting that ignores a need to allocate money for multiyear weapons development programs, for instance. "I travel around the world and this ... looks terrible," Carter told the House Armed Services Committee. "It gives the appearance that we are diminishing ourselves because we can't come together behind a budget, year in and year out."

The White House also is opposed to provisions that would make it harder for Obama to transfer the remaining 116 detainees out of Guantanamo Bay, Cuba, so he can make good on his pledge to close the military prison. Obama objects to the bill because it does not authorize the closing of unneeded U.S. military facilities, prohibits the retirement of the A-10 aircraft that provides close air support for ground troops and forces the administration to provide lethal assistance to Ukrainian forces fighting Russian-backed separatists -- something the White House has so far refrained from doing.