The White House on Wednesday said it would not veto the controversial National Defense Authorization Act (NDAA) of 2012.
President Barack Obama's spokesman Jay Carney said the latest version of the legislation had addressed his worries about new rules on terrorism suspects.
The legislation has been the subject of considerable criticism.
At one point the bill contained a provision that would have authorized the U.S. to use military force anywhere there were terrorism suspects, including within the U.S. itself. The American Civil Liberties Union described it as authorizing a "worldwide war without end."
The section was removed from the bill in July.
But other controversial provisions, Sections 1031 and 1032, remained. The provisions authorize the U.S. to indefinitely detain suspected terrorists anywhere in the world without charge or trial, and require them to be held in military custody. Civil liberties advocates and others were furious at lawmakers for the broad scope of the provisions, which could have allowed U.S. citizens on U.S. soil to be indefinitely detained without trial.
Democratic senators tried amend the provisions, but failed. Sen. Rand Paul (R-KY) warned the provisions "put every American at risk" of being sent to Guantanamo Bay. Sen. Mark Kirk (R-IL) said it violated the Constitution because U.S. citizens could be apprehended on U.S. soil and held without a trial.
Obama threatened to veto the entire bill because of the provisions, which he said were "inconsistent with the fundamental American principle that our military does not patrol our streets."
The latest version of the bill, drafted by the House-Senate conference committee, kept both provisions. But it exempted U.S. citizens from the requirement for terror suspects to be held in military custody and included language stating that the bill did not extend new authority to detain U.S. citizens.
The bill forces federal agencies to treat non-citizen terrorism suspects as enemies waging war against the U.S. rather than criminals. FBI Director Robert Mueller said the provisions would disrupt, rather than strengthen, efforts to fight terrorism in the U.S.
"The statute lacks clarity with regard to what happens at the time of arrest," he explained to the Senate Judiciary Committee. "It lacks clarity with regard to what happens if we had a case in Lackawanna, New York, and an arrest has to be made there and there's no military within several hundred miles."
"What happens if we have ... a case that we're investigating on three individuals, two of whom are American citizens and would not go to military custody and the third is not an American citizen and could go to military custody?"
[Ed note: This article was edited after publication]