The bill now goes to Bush for his signature.
Hours before the bill passed, Bush made a special trip to the Capitol to urge all members of his Republican Party to support the bill.
Republicans hold narrow majorities in both houses of Congress, but some Republican senators objected to certain aspects of the legislation.
A Different Kind Of War
After meeting in private with legislators for 30 minutes, Bush said it's important for the American people to know that the White House and Congress are working together to protect them from further terrorist attacks.
"Our most solemn job is the security of this country," Bush said. "People shouldn't forget there's still an enemy out there that wants to do harm to the United States. And therefore a lot of my discussion with the members of the Senate was to remind them of this solemn responsibility. And so I look forward to you passing good legislation, senators."
The legislation sets up a military-court system to try suspected terrorists. It forbids actions by interrogators that would constitute war crimes -- such as torture and rape -- but gives the president authority to determine which techniques short of war crimes questioners can legally use. And it protects interrogators from the Central Intelligence Agency (CIA) from prosecution on war crimes charges.
The Bush administration had tried to set up its own trial system, but the U.S. Supreme Court ruled in June that the White House needed to ask for legislative approval.
Today's bill is the product of intense negotiations between the White House and several prominent Senate Republicans.
The Bush administration originally wanted a measure that would have permitted it to give its unilateral interpretation to the Geneva Conventions' prohibition against what is called "cruel, inhuman, or degrading treatment" of prisoners.
The resulting compromise bill gives defendants more legal rights than they would have had under the White House's version of the courts, but fewer rights than defendants have under U.S. civilian and military courts.
During two days of debate on the bill, Republicans argued that the United States is facing an enemy unlike any it has faced before, and that the Bush administration needs extraordinary tools to fight it.
Senator John Warner (Republican, Virginia) compared the war on terror with World War II.
"[World War II] was a war of state-sponsored nations and aggressions -- men wearing uniforms, men acting at the direction of recognized governments. Today's war [has an enemy that] is a disparate bunch of terrorists, coming overnight, no uniforms, no principles, guided by nothing. And we are doing the best we can, as a nation, under the direction of our president, to defend ourselves."
Democrats countered that the country has faced difficult enemies in the past and has never seen a need to lower its standards of judicial practice and human rights.
"I don't think there's a choice between upholding the principles of American jurisprudence and fighting terrorism," Senator Christopher Dodd (Democrat, Connecticut) said. "Every generation of Americans will face its own threats. This is ours. Every previous generation faced serious threats. They did not abandon the principles upon which this country was founded. I'm fearful we're about to do that today."
In the new military commissions, defendants will be able to see classified evidence being used against them. But evidence that was obtained by coercion before the 2005 passage of the Detainee Treatment Act could be used in the trials if a judge approves.
And the bill contains a complicated set of rules that human rights groups said leaves open the possibility that harsh techniques like sleep deprivation can still be used.
The bill also broadens the definition of "enemy combatants" to include people who provide weapons, money, or other support to terrorist groups.
Democrats' objections to the bill could be summed up in the comments of Senator Byron Dorgan (Democrat, North Dakota). During debate on September 28, he said the United States would lose its leading role as a nation dedicated to human rights.
"Why is this country a country that's different from others?" Dorgan said. "Well, we've been different from others because it is in this country where you can't be picked up off of a street and held indefinitely, held without charges, held without a trial, held without a right to go to a court."