The vote was 370-58. The measure was revised to align with the budget agreement the president signed into law on Monday.
The White House says Obama remains opposed to provisions that hinder his ability to transfer 112 detainees out of Guantanamo and move them to other countries or to the US Spokesman Josh Earnest says there is no veto threat, but the president still must review the bill.
Republican Rep Mac Thornberry is chairman of the House Armed Services Committee. Thornberry says the bill is good for the troops and that he hopes the political maneuvering is over.