Congress is expected to act quickly on two stalled defense bills — including a $453 billion must-pass wartime spending measure — now that President Bush has agreed to a proposal to ban cruel, inhuman and degrading treatment of terrorism detainees in U.S. custody.

In a reversal, the president bowed to pressure from the GOP-controlled Congress and accepted the proposal put forth by Sen. John McCain, R-Ariz., on handling foreign terrorism suspects and limiting interrogation tactics used by American troops.

Bush's endorsement Thursday came after months of opposition that included White House veto threats of any bill that contained the McCain provisions.

"This is the democratic system working," Secretary of State Condoleezza Rice said Friday on CBS' "Early Show." "Senator McCain worked tirelessly with the administration to get to legislation that will allow us both to protect the American people ... and to do so within our laws and within our international obligations."

The proposal by McCain, a former Navy pilot who spent 5 1/2 years as a prisoner of war in Vietnam, has held up completion of two defense bills. Senate versions of the measure included the language, but the House bills did not.

Congress is likely to finish both defense bills as soon as this weekend. Lawmakers are expected to sign off on the McCain proposal in at least one of the bills — most likely in the spending measure that also provides $50 billion for the Iraq war — before adjourning in a few days.

With the end of the year looming, congressional negotiations to iron out the differences intensified this week, as did efforts between the White House and McCain to reach an agreement that would satisfy administration concerns.

A breakthrough was reached when McCain agreed to add language allowing civilian interrogators the same legal protections as those afforded to military interrogators — an offer he extended after rebuffing Bush administration efforts that early on sought an exemption for CIA interrogators and later sought some immunity from prosecution for those who are accused of violating the standards.

Already facing criticism of its detainee policies from abroad, the White House was dealt another blow Wednesday when the House voted to endorse McCain's proposal, which the Senate overwhelmingly approved months ago. As a result, both GOP-controlled chambers were on record backing McCain by veto-proof majorities, putting pressure on the White House to reach an agreement.

After months of negotiations, McCain declared "a done deal" that he said shows that the United States "upholds values and standards of behavior and treatment of all people, no matter how evil or bad they are."

"We've sent a message to the world that the United States is not like the terrorists," McCain said while appearing alongside the president in the Oval Office to announce the agreement.

The president said the ban and accompanying interrogation standards will "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."

McCain's proposal pitted the president against members of his own party and threatened to further tarnish a U.S. image already soiled by the abuses at Iraq's Abu Ghraib prison.

The legislation would prohibit "cruel, inhuman or degrading treatment or punishment" of anyone in U.S. government custody, regardless of where they are held. It also would require that service members follow procedures in the Army Field Manual during interrogations of prisoners.

Added was a provision modeled after the Uniform Code of Military Justice, which says military personnel accused of violating interrogation rules can defend themselves if a reasonable person could have concluded they were following a lawful order. Those rights — and the right to legal counsel — would be extended to CIA interrogators under the agreement.

Also added, officials said, was a statement explicitly rejecting immunity for those who violate the standards.

The Bush administration had long said a ban on cruel, inhuman and degrading practices did not legally apply to suspects held overseas. During a trip to Europe last week, Rice was pressed repeatedly on the topic, finally saying that "as a matter of U.S. policy," such treatment was banned for U.S. personnel wherever they are.

The agreement reached Thursday would put the prohibition into law.

The White House initially threatened to veto legislation containing the McCain proposal and sought to kill it altogether, arguing that the ban and interrogation limits could tie the president's hands during wartime. The administration later switched gears and Vice President Dick Cheney made a rare personal appeal to all GOP senators for a CIA exemption. Later, the administration sought some protection from prosecution for accused interrogators.

McCain said there were "legitimate concerns raised by the administration concerning the rights of interrogators," leading to the additional language.

Bush said the agreement ensures "protections for those who are the front line of fighting the terrorists."