The vote paved the way for final passage of Mr. Bush's plan to establish "military commissions" to prosecute terrorism suspects in legislation that also spells out violations of the Geneva Conventions, a treaty that sets international standards for the treatment of war prisoners.
Republicans say the bill is necessary to ensure that terrorists can be brought to justice and that CIA personnel will not be charged with war crimes when interrogating these suspects.
Barring any last-minute hiccups, the bill could reach the president's desk as early as Friday.
Mr. Bush had gone to Capitol Hill earlier Thursday, urging senators to follow the House lead and approve the plan. "The American people need to know we're working together to win the war on terror," he told reporters as he left.
The Senate voted 51-48 against an amendment by Sen. Arlen Specter that would have allowed terror suspects to file "habeas corpus" petitions in court. Specter contends the ability to file such pleas is considered a fundamental legal right and is necessary to uncover abuse.
"This is a constitutional requirement and it is fundamental that Congress not legislate contradiction to a constitutional interpretation of the Supreme Court," said Specter, R-Pa., chairman of the Judiciary Committee.
Three Republicans voted with Specter but others in the GOP caucus contended that providing terror suspects the right to unlimited appeals weighs down the federal court system.
"It impedes the war effort, and it is irresponsible," said Lindsey Graham, R-S.C.
Democrats sided with Specter.
"The habeas corpus language in this bill is as legally abusive of rights guaranteed in the Constitution as the actions at Abu Ghraib, Guantanamo and secret prisons that were physically abusive of detainees," said Sen. Carl Levin, the top Democrat on the Armed Services panel.
CBS News legal analyst Andrew Cohen points out that the reach of the bill has been expanded to include non-citizens who are legal residents of the U.S.
"It's hard to overemphasize the significance of this, coming especially as it does at the 11th hour without very much public debate about its consequences," Cohen said. "This provision alone gives the executive branch a tremendous amount of unfettered power to detain people who otherwise are here in the United States lawfully and broadens the scope of the detainee bill in a major way."
The House on Wednesday passed a nearly identical measure on a 253-168, following bitter partisan debate in which Republicans and Democrats traded barbs on which political party would better protect Americans. After the Senate passes its bill, the House will vote again Friday to approve the Senate measure and send it to the president to sign, according to House and Senate leadership aides.
Three Democrats also were being given opportunities to offer amendments Thursday, but all were expected to be rejected along party lines. Democrats have said the legislation would give the president too much latitude when deciding whether aggressive interrogations cross the line and violate international standards of prisoner treatment.
The legislation would establish a military court system to prosecute terror suspects, a response to the Supreme Court ruling in June that Congress' blessing was necessary. Under the bill, a terrorist being held at Guantanamo Bay prison in Cuba can be tried by "military commission" so long as he is afforded certain rights, such as the ability to confront evidence given to the jury and access to defense counsel.
Those subject to the commission trials would be any person "who has engaged in hostilities or who has purposefully and materially supported hostilities against the United States or its co-belligerents." Proponents say this definition would not apply to U.S. citizens but would allow the detention and prosecution of individuals financing terrorist networks.
While the bill would spell out legal rights for the terror suspects to ensure a fair trial, it would eliminate other rights common in military and civilian courts. For example, the commission would be allowed to consider hearsay as evidence so long as a judge determines it is reliable. Hearsay is frequently allowed in international military tribunals, but is barred from being considered in civilian courts.
The court would bar the military commission from considering evidence obtained by interrogation techniques since December 2005 that involve "cruel, inhuman or degrading treatment" as defined by the 5th, 8th and 14th amendments. Coerced statements taken before the 2005 ban was put into effect would not be subjected to the same standard — language Democrats charge creates a loophole for abuse.
The measure also provides extensive definitions of war crimes such as torture, rape and biological experiments, but gives the president broad authority to decide which other techniques U.S. interrogators may use legally. The provisions are intended to protect CIA interrogators from being prosecuted for war crimes.
For nearly two weeks the White House and rebellious Republican senators have fought publicly over whether Mr. Bush's plan would give a president too much authority. But they struck a compromise last Thursday.
"This bill is everything we don't believe in," said Rep. Dennis Kucinich, D-Ohio.