Senators green-lit their version of the annual US defense budget hours ahead of the summer recess Thursday night -- setting up a showdown in the fall with House Republicans who passed a much more contentious version.

The National Defense Authorization Act (NDAA) approves $886 billion President Joe Biden requested for 2024 military programs, giving troops a 5.2 percent pay hike and providing $300 million for Ukraine's defense.

"This forward-looking defense bill will go a long way toward keeping the American people safe, deterring conflict, and confronting the national security threats we face," Armed Services Committee Chairman Jack Reed said in a statement.

The package passed by 86 votes to 11, comfortably crossing the 60-vote threshold as Republicans joined the Democrats who control the upper chamber to back the legislation.

But the vote tees up a clash with the Republican-led House of Representatives, which passed its own version two weeks ago, adding a raft of hardline "culture war" measures to the legislation.

Almost every House Democrat opposed the normally uncontroversial legislation, which would roll back military diversity programs and end funding for transgender medical care and for personnel traveling out of state for abortions.

"What's happening in the Senate is a stark contrast to a bipartisan race to the bottom we saw in the House where House Republicans are pushing partisan legislation that has zero chance of passing," Senate Democratic Majority Leader Chuck Schumer said ahead of the vote.

The House and the Senate will have to reconcile their very different packages to come to a compromise that can win the approval of both chambers when Congress returns from its summer recess in September.

"Although I would have preferred a topline defense spending number that better reflects the most dangerous threat environment that the United States has faced since World War II, I appreciate the hard work that the Senate has put into this year's NDAA," said Roger Wicker, Reed's Republican counterpart.

"The bill we have delivered takes care of our troops with a substantial pay raise and reforms that will improve quality of life for our servicemen and women."