U.S. soldiers' abuse of Iraqi prisoners has undercut the Bush administration's legal rationale for key components of its anti-terrorism policies, with some officials privately worrying that the scandal may hurt the administration's chances of winning three test cases before the Supreme Court, lawyers close to the Bush legal team said.

At the court, the administration has maintained that military and intelligence officials engaged in the fight against terrorism should generally not be accountable to the judiciary for their conduct of military operations in wartime.

But the pictures from Abu Ghraib prison illustrate the potential for abuse when the executive branch exercises unchecked authority over its prisoners, said the lawyers, who described their conversations with administration colleagues on the condition of anonymity.

"Of course it hurts us like hell," said one private lawyer who has advised administration officials on terrorism-related legal issues. "I spoke to several people at Justice in the last several days . . . and they said it is clearly going to impact the justices."

A former Bush administration official described his senior-level administration contacts as "pretty depressed" over their prospects at the Supreme Court.

The court does not formally take into account facts outside the record before it. None of the three cases deals directly with Iraq, and at oral argument some justices expressed skepticism that constitutional rights would apply on the overseas battlefields of Iraq or Afghanistan.

Still, lawyers familiar with the cases say the justices cannot help but be affected by a scandal that has disturbed the nation.

"It depends on how Abu Ghraib is perceived" at the court, said David B. Rivkin Jr., a former Justice Department official who wrote a friend-of-the-court brief on behalf of former State Department and military lawyers who back the administration. "If it's seen as individual abuses, and the system is working -- the military moved quite swiftly to investigate, punished those responsible -- that should reassure the justices. . . . If it is perceived as indicative of a deep, systemic flaw, of the fact that the executive cannot be trusted, then it clearly would not be helpful."

The first of the three pending terrorism-related cases involves a demand for access to U.S. courts by foreign terrorism suspects being held at the U.S. naval base in Guantanamo Bay, Cuba.

Detainees say they have a right to challenge their confinement before a judge, but the Bush administration says Guantanamo is outside the federal courts' jurisdiction.

The Bush administration considered the Guantanamo matter winnable. But the Abu Ghraib revelations were particularly damaging to its position, lawyers said, because the pictures of abuse cast doubt on extensive Justice Department assurances to the court that military law and procedures are sufficient to protect detainees.

The brief by Solicitor General Theodore B. Olson said that "the Department of Defense has made clear that it is treating detainees at Guantanamo humanely and providing them with many privileges similar to those accorded to prisoners of war."

The Guantanamo issue was argued before the court on April 20. According to normal procedure at the court, the justices would have voted on it at a closed-door conference on April 23, before CBS broadcast pictures of abuse at Abu Ghraib.

Two other cases involving the rights of terrorism detainees -- this time U.S. citizens -- were argued on April 28.

Yaser Esam Hamdi, a U.S.-born Saudi caught in Afghanistan while allegedly fighting for the Taliban, and Jose Padilla, arrested in Chicago as a suspected al Qaeda operative, have been declared "enemy combatants" by President Bush and held nearly incommunicado in a South Carolina naval brig.

Their attorneys say this violates the men's constitutional rights. The administration counters that Congress has empowered the commander in chief to wage war against the people responsible for the terrorist attacks of Sept. 11, 2001, and that the identification and confinement of enemy combatants has long been the sole purview of the executive.

The Abu Ghraib revelations also clashed with remarks Deputy Solicitor General Paul D. Clement made to the court during oral argument in the Padilla case.

Justice Ruth Bader Ginsburg posed a scenario for Clement's response: "Suppose the executive says mild torture, we think, will help get this information," she said. "It's not a soldier who does something against the code of military justice, but it's an executive command. Some systems do that to get information."

"Well, our executive doesn't," Clement, the administration's second-ranking Supreme Court advocate, replied. "Where the government is on a war footing . . . you have to trust the executive to make the kind of quintessential military judgments that are involved in things like that."

That night, the first pictures emerged. If the justices held to court routine, they voted on the Hamdi and Padilla cases two days later.