The House passed a nearly $612 billion defense policy bill Friday despite President Obama's veto threat and Democratic worries that the measure opens the door to sharp cuts in domestic spending later this year.

The vote was 269 to 151 for the bill, which maps next year's military and national security programs.

A 2011 bipartisan budget deal placed caps on defense and domestic spending. The defense bill that passed skirts those limits by putting $89 billion of the total into an emergency war-fighting fund, which is exempt from the caps. Democrats predict that Republicans won't attempt to do end-runs around the spending caps when it comes to domestic spending.

Rep. Adam Smith of Washington state, the ranking Democrat on the House Armed Services Committee, urged his colleagues to vote against the bill.

"It doesn't fix the problem," Smith said. "The president has promised to veto all the appropriations bills and the defense bill that are based on this flawed approach to the budget. So what we are doing here is ultimately not going to be successful until we come up with a better long-term solution to dealing with the budget caps."

Rep. Mac Thornberry, R-Texas, chairman of the House Armed Services Committee, has acknowledged in recent days that the approach is not the best way to "run a railroad."

But he urged the Democrats Friday to vote for the bill anyhow by quoting the last line of an editorial published Friday in The Washington Post: "Far better for him (Obama), and his party's leadership in Congress to help an adequate defense budget keep moving through Congress rather than perpetuate a fight all Americans, whether Republican or Democrat, might later regret."

Overall, the House bill authorizes $515 billion in spending for national defense and another $89.2 billion for the emergency war-fighting fund for a total of $604.2 billion. Another $7.7 billion is mandatory defense spending that doesn't get authorized by Congress. That means the bill would provide the entire $611.9 billion desired by the president, but he and Democratic lawmakers still oppose it.

House Minority Leader Nancy Pelosi wrote a letter on Thursday urging her colleagues to vote against the bill.

"The Republican defense authorization bill before the House is both bad budgeting and harmful to military planning -- perpetuating uncertainty and instability in the defense budget, and damaging the military's ability to plan and prepare for the future," the California Democrat wrote. "As Defense Secretary (Ash) Carter said last week, Republicans' approach is `clearly a road to nowhere,' `managerially unsound' and `unfairly dispiriting to our force.' "

The White House pushed back against a host of provisions in the bill, including one that would make it harder for Obama to close the military prison for terror suspects at Guantanamo Bay, Cuba. On Ukraine, it calls for arming Ukrainian forces fighting Russian-backed separatists, a move the Obama administration has so far resisted.

The administration also opposes measures that aim to bypass the Iraqi government in Baghdad and give money directly to Iraqi Kurdish fighters. That has angered Shiite cleric Muqtada al-Sadr, who threatened to attack U.S. interests if the provision passes.

The Senate version follows the same approach to funding the military. The Senate Armed Services Committee voted 22-4 on Thursday to authorize $523 billion in base funding for the Defense Department and other national security programs and an additional $90.2 billion for the emergency war-fighting fund.

In the House, lawmakers debated 135 amendments to the measure.

The House voted 221-202 to strip an immigration provision opposed by conservatives. The nonbinding provision would have encouraged a Pentagon study on allowing immigrants brought illegally to the country as children to enlist in the military. Conservatives who pushed the vote say the measure would have encouraged amnesty and validated what they consider to be unconstitutional actions Obama has taken to protect millions of immigrants from deportation.