House lawmakers on Friday approved a $612 billion defense authorization bill for next year despite objections from Democratic leaders and a White House veto threat over plans to skirt spending caps with oversized temporary war funds.

The measure includes an overhaul of the military's retirement system and rejects a host of pay and benefits trims proposed by the Pentagon. It supports, in principle, a 2.3 percent pay raise for troops, but lacks the legislative language to force that paycheck boost, leaving flexibility for President Obama to go with the lower 1.3 percent raise backed by Pentagon leaders.

The bill also includes a host of new policy changes on sexual assault protections and prosecution, reforms to the defense acquisition process, and restrictions on transfer of detainees out of Naval Station Guantanamo Bay, Cuba.

The final 269-151 vote came after two days of pleas from Republican leaders to advance the bill. The measure had passed out of the House Armed Services Committee last month on a 60-2 vote and often enjoys bipartisan support even amid the bitter party fights that have become increasingly common on Capitol Hill.

But Rep. Adam Smith, D-Wash., the armed services committee's ranking Democrat, led efforts to oppose the measure this time over the war funding boost, calling it a gimmick by GOP leaders. The White House has also threatened to veto the measure over the funding breakdown.

FILE - This file image made from video posted on a militant website Saturday, July 5, 2014, purports to show the leader of the Islamic State group, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance. Al-Baghdadi has released a new message encouraging his followers to keep up the fight for the city of Mosul, which they are defending against Iraqi government forces, a U.S. organization that monitors militant activity online said Thursday, Nov. 3, 2016. (AP Photo/Militant video, File)
FILE - This file image made from video posted on a militant website Saturday, July 5, 2014, purports to show the leader of the Islamic State group, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance. Al-Baghdadi has released a new message encouraging his followers to keep up the fight for the city of Mosul, which they are defending against Iraqi government forces, a U.S. organization that monitors militant activity online said Thursday, Nov. 3, 2016. (AP Photo/Militant video, File)
FILE - This file image made from video posted on a militant website Saturday, July 5, 2014, purports to show the leader of the Islamic State group, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance. Al-Baghdadi has released a new message encouraging his followers to keep up the fight for the city of Mosul, which they are defending against Iraqi government forces, a U.S. organization that monitors militant activity online said Thursday, Nov. 3, 2016. (AP Photo/Militant video, File)
FILE - This file image made from video posted on a militant website Saturday, July 5, 2014, purports to show the leader of the Islamic State group, Abu Bakr al-Baghdadi, delivering a sermon at a mosque in Iraq during his first public appearance. Al-Baghdadi has released a new message encouraging his followers to keep up the fight for the city of Mosul, which they are defending against Iraqi government forces, a U.S. organization that monitors militant activity online said Thursday, Nov. 3, 2016. (AP Photo/Militant video, File)

Administration officials had pushed for the same total level of spending but with congressional action to repeal the spending caps approved in 2011, which would allow increased spending for other agencies as well. Instead, the GOP plan shifted almost $40 billion into the Pentagon's temporary "overseas contingency operations" war fund and left the overall spending caps in place.

"There are a lot of good things in this bill," Smith said Friday. "But we have one overarching problem, the same that we've had since 2011. ... This bill's reliance on the overseas contingency (account) is a problem for the Department of Defense. This doesn't lift the budget caps, and that is harmful."

Committee chairman Rep. Mac Thornberry, R-Texas, repeatedly dismissed those concerns and criticized Democrats for using the policy bill as a target for political attacks.

"This is one step in the process," Thornberry said. "If there is a better way to deal with these issues in the appropriations bills, there is time to do that."

In the end, 143 Democrats voted against the measure, while 41 voted for it.

On Thursday, the House also stripped from the bill another controversial provision that would have encouraged military officials to study ways to enlist undocumented immigrants in exchange for a pathway to legal status.

The 221-202 vote on that provision — with all House Democrats voting against it — helped shore up GOP support for the measure and temporarily injected the ongoing immigration fight into the defense bill.

And just before final passage, Republicans rejected a bid by Democrats to lock in the 2.3 percent pay raise for the troops and also guarantee continued pay for the military in the event of a government shutdown. Republicans said those changes were more about political gamesmanship than strengthening the legislation.

The military retirement overhaul would replace the current 20-year, all-or-nothing deal with a "blended" compensation system featuring a 401(k)-style investment plan that promises all future troops will leave the service with some money for retirement.

Senate officials have proposed a similar plan, but critics have argued the changes could hurt recruiting and retention.

The differences in those plans — and in the rest of the bills — must be reconciled by a conference committee later this summer, after the Senate's draft of the defense authorization bill is finalized. No voting schedule has been announced in that chamber.

The Senate Armed Services Committee's version of the bill, unveiled Thursday, includes the 1.3 percent pay raise, trims to housing allowances and changes to the Tricare health benefit.

Pentagon officials have argued those kinds of personnel savings are needed to keep military training and modernization accounts solvent, but outside advocates have blasted service officials for targeting troops' wallets to pay for post-war budget reductions.

The authorization bill deliberations are not expected to be resolved until later summer at the earliest. Both chambers also still need to advance their respective defense appropriations plans before the military's fiscal 2016 finances will be settled.