It should have been unmitigated good news yesterday when President Bush finally announced that he would back Senator John McCain's proposal to ban torture and "cruel, inhuman or degrading" treatment at United States prison camps. Nothing should be more obvious for an American president than to support a ban on torture.

But this is the president who scrapped the rules on the decent treatment of prisoners in the first place and whose lawyers concocted memos on legalizing torture. On further reflection, the feeling of relief faded fast.

Mr. McCain's amendment is attached to a malignant measure -- introduced by Senator Lindsey Graham, Republican of South Carolina, and now co-sponsored by Senator Carl Levin of Michigan, the top Democrat on the Senate Armed Services Committee -- that would do grievous harm to the rule that the government cannot just lock you up without showing cause to a court. This fundamental principle of democratic justice must not be watered down so the Bush administration does not have to answer for the illegal detentions of hundreds of men at Guantánamo Bay and other prison camps.

Mr. Graham's original measure would at least have barred the use of coerced confessions from prisoners like those at Guantánamo. But the current version actually appears to allow coerced evidence. Lawmakers were also discussing language that would strip United States courts, including the Supreme Court, of the power to review detentions. Bruce Ackerman, a professor of law at Yale University, said that Congress had not attacked the courts in this fashion since Reconstruction.