US President George W Bush's decision to support a new law banning cruel, inhuman or degrading treatment of terrorist suspects marks a remarkable retreat under fire.
By Matthew Davis
BBC News, Washington
The White House, and particularly Vice-President Dick Cheney, had fought hard to have the Central Intelligence Agency exempted from the legislation, arguing that the agency needed to be allowed special powers in the fight against terrorism.
Mr Cheney had telephoned every Republican senator to try to get the measure derailed.
President Bush (R) has suffered a blow to his authority
But when Congress came out overwhelmingly in favour of the law - proposed by Republican Senator John McCain - Mr Bush was backed into a corner.
Sitting next to Mr McCain at a White House news conference, the president attempted to make the best of what is something of a blow to his authority.
"We've been happy to work with [Senator McCain] to achieve a common objective," he said.
"And that is to make it clear to the world that this government does not torture and that we adhere to the international convention on torture, whether it be here at home, or abroad."
Mr McCain - who is widely expected to run for president in 2008 - has bitter personal experience of torture as a prisoner-of-war in Vietnam.
He argued that the prisoner abuse scandal at Abu Ghraib jail in Baghdad and other allegations of torture had severely damaged the reputation of the US, threatening its ability to win the war on terror.
After winning the assurances he wanted, Mr McCain said the new law would send a message to the world that "the United States is not like the terrorists".
But part of the newly-brokered deal is being seen as offering a face-saving compromise for the White House.
It envisages that the CIA and other civilian interrogators will get the same legal rights that members of the military have when accused of breaking interrogation guidelines. In such cases, the accused can use the defence that it was reasonable for them to believe they were obeying a legal order.
Mr McCain's measure also requires that the US military follow procedures in the Army Field Manual during interrogations.
The manual has been undergoing revision for some time now, but when it is finalised is expected to explicitly state what military interrogators can and cannot do.
The McCain amendment comes at a time when the issue of the US treatment of prisoners during its war on terror is under scrutiny on a number of fronts.
Last week, Secretary of State Condoleezza Rice signalled an apparent softening of US policy when she said the United Nations treaty on torture applied to American interrogators in the US and overseas. The administration had previously said the convention did not apply to US personnel abroad.
The secretary of state has also admitted that terror suspects are flown abroad for interrogation under a process called "rendition".
Yet Ms Rice has refused to address international uproar at reports that the CIA has so-called "black sites" in eastern Europe and Asia where suspected terrorists are held far from public scrutiny.
And it is not only the treatment of prisoners in custody that has angered opponents.
Human rights groups have complained that prisoners of the US are sometimes detained arbitrarily, and kept for months on end without facing charges or trial.