WASHINGTON (Reuters) - The U.S. House of Representatives passed its version of a massive annual defense bill on Friday, leaving out controversial amendments on transgender troops and climate policy but backing President Donald Trump’s desire for a bigger, stronger military.

FILE PHOTO: U.S. Marines and sailors man the rails aboard the USS America (LHA-6) as they leave port and deploy to the Pacific with the America Amphibious Ready Group from Naval Base San Diego in San Diego, California, U.S., July 7, 2017. REUTERS/Mike Blake

The vote was 344-81 to pass the National Defense Authorization Act (NDAA), which sets military policy and authorizes up to $696 billion in spending for the Department of Defense.

Underscoring bipartisan support for higher defense spending in Congress, 117 Democrats joined 227 Republicans in backing the measure. Only eight Republicans and 73 Democrats voted no.

But the measure faces more hurdles before it can become law, notably because it would increase military spending beyond last year’s $619 billion bill, defying “sequestration” caps on government spending set in the 2011 Budget Control Act.

Trump wants to pay for a military spending increase by slashing nondefense spending. His fellow Republicans control majorities in both the House and Senate, but they will need support from Senate Democrats, who want to increase military spending, for Trump’s plans to go into effect.

The House NDAA also increases spending on missile defense by 25 percent, adds thousands more active-duty troops to the Army, provides five new ships for the Navy and provides a 2.4 percent salary increase for U.S. troops, their largest pay raise in eight years.

And it creates a new Space Corps military service, pushed by lawmakers worried about China and Russia’s activities in space, but opposed by Defense Secretary Jim Mattis.

The Senate will vote on its version of the NDAA later this year, and the two versions must be reconciled before the measure can be sent to the White House for Trump to sign into law or veto.

Trump has not threatened to veto the bill, but his administration listed several problems with it, including opposition to the proposed Space Corps and its failure to authorize new base realignments and closures.

During debate on amendments to the NDAA this week, the House rejected a Republican-sponsored amendment that would have ended the Pentagon’s policy of providing gender-reassignment surgery and other therapy for active-duty transgender service members.

Lawmakers also defeated a proposed Republican amendment that would have prevented the Pentagon from implementing climate-change and green energy policies.