The latest defense spending bill has Congress and the White House at odds over how to handle suspected terrorists.
The White House has threatened to veto the $662 billion legislation the Senate passed on Thursday.
The bill requires the military to indefinitely detain suspected terrorists linked to al Qaeda or its affiliates, even those captured on U.S. soil, and detain some indefinitely without trial.
The measure continues the politically charged disagreement between many government officials over whether to treat suspected terrorists as prisoners of war or criminals.
Defense Secretary Leon Panetta and FBI Director Robert Mueller have opposes the provisions.
The White House also condemned the measure, saying it cannot accept any legislation that "challenges or constrains the president's authorities to collect intelligence, incapacitate dangerous terrorists and protect the nation."
An amendment to that bill which also imposes new sanctions on Iran's central bank had widespread bipartisan support. It's the latest U.S. response to concerns over Iran's nuclear weapons program.
"Iran's actions are unacceptable and pose a danger to the United States and the entire world," said Senate Majority Leader Harry Reid, D-Nev.