At a ceremony in the East Room of the White House, President Bush said the bill, above all else, "will save American lives" and help foil attacks on the U.S. by authorizing the CIA interrogation of suspected terrorists.
"Put simply, this program has been one of the most vital tools in the war against the terrorists. It's been invaluable to both America and our allies," Mr. Bush said.
The law allows aggressive interrogation techniques, but the president said the U.S. will abide by its international obligations and will not engage in torture, reports CBS News White House correspondent Mark Knoller.
Mr. Bush's plan for treatment of the terror suspects became law just six weeks after he acknowledged that the CIA had been secretly interrogating suspected terrorists overseas and pressed Congress to quickly give authority to try them in military commissions.
"With the bill I'm about to sign, the men our intelligence officials believe orchestrated the murder of nearly 3,000 innocent people will face justice," Mr. Bush said.
A coalition of religious groups staged a protest against the bill outside the White House, shouting "Bush is the terrorist" and "Torture is a crime." About 15 of the protesters, standing in a light rain, refused orders to move. Police arrested them one by one.
Among those the United States hopes to try are Khalid Sheikh Mohammed, the accused mastermind of the Sept. 11 attacks, as well as Ramzi Binalshibh, an alleged would-be 9/11 hijacker, and Abu Zubaydah, who was believed to be a link between Osama bin Laden and many al Qaeda cells.
"It is a rare occasion when a president can sign a bill that he knows will save American lives," Mr. Bush said. "I have that privilege this morning."
The president signed the bill in the White House East Room, at a table with a sign positioned on the front that said "Protecting America." He said he signed it in memory of the victims of the Sept. 11 attacks.
Among those in the audience were military officers, lawmakers who helped pass the bill and members of Mr. Bush's Cabinet.
He singled out for praise, among others, Secretary of Defense Donald H. Rumsfeld, who has come under sharp criticism in recent months as violence has soared in Iraq.
The law protects detainees from blatant abuses during questioning – such as rape, torture and "cruel and inhuman" treatment – but does not require that any of them be granted legal counsel. Also, it specifically bars detainees from filing habeas corpus petitions challenging their detentions in federal courts. Mr. Bush said the process is "fair, lawful and necessary."
"The bill I sign today helps secure this country and it sends a clear message: This nation is patient and decent and fair and we will never back down from threats to our freedom," Mr. Bush said. "We are as determined today as we were on the morning of Sept. 12, 2001."
"Over the past few months, the debate over this bill has been heated and the questions raised can seem complex," he said. "Yet, with the distance of history, the questions will be narrowed and few. Did this generation of Americans take the threat seriously? And did we do what it takes to defeat that threat?"
The American Civil Liberties Union said the new law is "one of the worst civil liberties measures ever enacted in American history."
"The president can now, with the approval of Congress, indefinitely hold people without charge, take away protections against horrific abuse, put people on trial based on hearsay evidence, authorize trials that can sentence people to death based on testimony literally beaten out of witnesses, and slam shut the courthouse door for habeas petitions," said ACLU Executive Director Anthony D. Romero.
"Nothing could be further from the American values we all hold in our hearts than the Military Commissions Act," he said.
The swift implementation of the law is a rare bit of good news for Mr. Bush as casualties mount in Iraq in daily violence. Lawmakers are increasingly calling for a change of strategy and political anxieties are jeopardizing Republican's chances of hanging onto control of Congress.
Mr. Bush needed the legislation because the Supreme Court in June said the administration's plan for trying detainees in military tribunals violated U.S. and international law.
The legislation, which sets the rules for court proceedings, applies to those selected by the military for prosecution and leaves mostly unaffected the majority of the 14,000 prisoners in U.S. custody, most of whom are in Iraq.
The Pentagon had previously selected 10 prisoners at Guantanamo Bay prison to be tried. Mr. Bush is expected also to try some or all the 14 suspects held by the CIA in secret prisons and recently transferred to military custody at Guantanamo.
The bill also eliminates some rights common in military and civilian courts. For example, the commission would be allowed to consider hearsay evidence so long as a judge determined it was reliable. Hearsay is barred from civilian courts.
The legislation also says the president can "interpret the meaning and application" of international standards for prisoner treatment, a provision intended to allow him to authorize aggressive interrogation methods that might otherwise be seen as illegal by international courts. White House press secretary Tony Snow said Mr. Bush would probably eventually issue an executive order that would describe his interpretation, but those documents are not usually made public and Snow did not reveal when it might be issued.