President George W Bush has announced he will support a new law banning cruel, inhuman or degrading treatment of terrorist suspects.
Sponsored by Republican Senator John McCain, the law on torture has been the subject of months of negotiations between Congress and the White House.
The BBC's Adam Brookes in Washington says this is a change of heart by Mr Bush, under pressure from Congress.
Mr Bush had said it would constrain the military and intelligence agencies.
We've been happy to work with him to achieve a common objective - and that is to make it clear to the world that this government does not torture
President Bush
Bush bows to pressure
But when both the Senate and the House of Representatives came out overwhelmingly in favour of a new law banning torture, Mr Bush did not have much choice, our correspondent says - even though it is a blow to presidential authority.
It is also being seen as bitter personal defeat for Vice-President Dick Cheney, who had telephoned every Republican senator to try to get the measure derailed.
'Hearts and minds'
Mr McCain, once a prisoner of war who was tortured in Vietnam and now senator for Arizona, proposed the measure as an amendment to a military spending bill.
The move was announced at a joint White House news conference
The law's supporters argued that it would repair some of the damage done to America's international standing by detainee abuse scandals in Iraq and Afghanistan.
The White House said it would make US interrogators and guards much more vulnerable to lawsuits filed by aggrieved detainees.
Both the Senate and the House of Representatives, which are controlled by the Republicans, disagreed.
Setting the standard
At a joint news conference with Mr McCain at the White House, Mr Bush did not directly mention the new law.
We have sent a message to the world that the US is not like the terrorists
But referring to Mr McCain, he said: "We've been happy to work with him to achieve a common objective - and that is to make it clear to the world that this government does not torture, and that we adhere to the International Convention of Torture whether it be here at home or abroad."
Senator McCain said the law would help win "hearts and minds" in the fight against terrorism.
"We have sent a message to the world that the US is not like the terrorists," he said.
"We have no brief for them. But what we are is a nation that upholds values and standards of behaviour and treatment of all people, no matter how evil or bad they are."