THE SENATE has taken a major step toward stopping the most damaging and shameful American conduct during the war on terrorism. An amendment to the defense appropriations bill offered by Sen. John McCain (R-Ariz.) and approved Wednesday night by the resounding vote of 90 to 9 would end four years of uncertainty about the rules for the military's treatment of detainees. It would also close the loophole that administration lawyers improperly opened for the CIA in an anti-torture treaty the United States ratified a decade ago, by prohibiting "cruel, inhuman and degrading" treatment for all prisoners held in U.S. custody.

If upheld by the House, Mr. McCain's amendment would curtail, at last, the policy of abuse adopted by the Bush administration for detainees in the war on terrorism. It would mandate an end to the hundreds of cases of torture and inhumane treatment, many of them qualifying as war crimes, that have been documented by the International Red Cross and the Army itself at Guantanamo Bay, Cuba, and in Afghanistan and Iraq, and elsewhere. Improper practices approved by Defense Secretary Donald H. Rumsfeld for the Guantanamo Bay prison and subsequently exported to Iraq, such as stripping prisoners naked and threatening them with dogs, would be out of bounds. Such conduct is not permitted by the U.S. Army Field Manual on Intelligence Interrogation, which conforms with the Geneva Conventions and which, under the McCain amendment, would set the standard. Also out of bounds would be the even harsher methods approved by Attorney General Alberto R. Gonzales and used by the CIA on detainees it is holding in secret locations abroad, such as simulated drowning and mock execution. With the endorsement of a long list of senior retired military officers, including Colin L. Powell, former chairman of the Joint Chiefs of Staff, the Senate has sent a clear message that such practices are a dangerous departure from decades of past practice and an unacceptable violation of American values.

The amendment gives President Bush a chance at least to amend the record of abuse that will blot his legacy. Yet Mr. Bush is not inclined to accept this chance. Despite the mounting reaction from the Senate, the military establishment, the courts and courageous serving officers such as Capt. Ian Fishback, the president stubbornly digs his dishonorable hole deeper. The White House is leaning on Republican House members to kill or water down the McCain amendment; the president's spokesman even threatened a veto.

Let's be clear: Mr. Bush is proposing to use the first veto of his presidency on a defense bill needed to fund military operations in Iraq and Afghanistan so that he can preserve the prerogative to subject detainees to cruel, inhuman and degrading treatment. In effect, he threatens to declare to the world his administration's moral bankruptcy.

Congress should proceed anyway. Its intervention in the handling and interrogation of prisoners in the war is overdue. Defense bill conferees and the House should support the McCain amendment without alteration. They should also back a parallel amendment by Sen. Lindsey O. Graham (R-S.C.) that provides for congressional oversight of the review panels the administration has established for enemy combatants held at Guantanamo. Congress's correction of Mr. Bush's willful violation of U.S. principles in the handling of detainees would show the world that American democracy is working. It will also give our soldiers a better chance of winning the war they have been asked to fight.