Newly released documents and interviews portray the civilian leadership at the Pentagon as urgently concerned that al Qaeda and Taliban detainees might have information that could prevent terrorist attacks and as searching intently for effective and "exceptional" interrogation techniques that would pass legal muster.

Defense Secretary Donald H. Rumsfeld and his senior aides emerge as central players in the government's struggle over nearly three years to decide how far it could go to extract information from those captured in Afghanistan and Iraq and others imprisoned at Guantanamo Bay, Cuba.

The result, seen in the documents and in the officials' statements, is a trail of fitful ad hoc policymaking in which interrogation tactics were authorized for a time, then rescinded or modified after the Pentagon's lawyers or others raised legal, ethical or practical objections. Some practices authorized in the field were pulled back at the Pentagon level, and decisions on how to treat detainees were sometimes made case by case.

Rumsfeld, for example, approved in December 2002 a range of severe methods including the stripping of prisoners at Guantanamo, and using dogs to frighten them. He later rescinded those tactics and signed off on a shorter list of "exceptional techniques" suggested by a Pentagon working group in 2003, even though the panel pointed out that, historically, the U.S. military had rejected the use of force in interrogations. "Army interrogation experts view the use of force as an inferior technique that yields information of questionable quality," and distorts the behavior of those being questioned, the group report noted.

Although the White House this week repudiated a Justice Department opinion that torture might be legally defensible, Pentagon general counsel William J. Haynes II in 2003 forced the Pentagon working group to use it as its legal guidepost. He did so over objections from the top lawyers of every military service, who found the legal judgments to be extreme and wrong-headed, according to several military lawyers and memos outlining the debate that were summarized for The Washington Post.

In Iraq, where White House and Pentagon lawyers say all prisoners are protected by the Geneva Conventions, Rumsfeld agreed to hide an Iraqi captive from the International Committee of the Red Cross because, he said, CIA Director George J. Tenet asked him to. Legal experts call it a clear violation of the conventions. "A request was made to do that, and we did," Rumsfeld said last week, even as his deputy general counsel, Daniel J. Dell'Orto, acknowledged from the same podium that "we should have registered him much sooner than we did."

Rumsfeld played a direct role in setting policies for detainee treatment in Afghanistan and Guantanamo, according to a list of Defense Department memos related to Guantanamo Bay obtained by The Post. He signed seven orders from January 2002 to January 2003 establishing the interrogation center, placing the Army in charge, allowing access by the Red Cross and foreign intelligence officials, and even deciding how detainee mail would be handled.

Unlike the CIA, which vetted and won approval from the Justice Department and National Security Council for its aggressive interrogation tactics after Sept. 11, 2001, the Pentagon has worked largely on its own in promulgating new questioning methods.

The White House and Justice Department were "completely uninvolved with" reviewing the interrogation rules in Afghanistan and Iraq, said a senior administration official involved in the process.

The Pentagon's chief spokesman, Lawrence T. DiRita, portrayed Rumsfeld as largely responding to requests from commanders and interrogators in the field rather than pushing a certain interrogation policy. "These things tended to come up through legal channels," he said in an interview.

Part of the Pentagon leadership's drive for more leeway in interrogations can be traced to a historic change during Rumsfeld's tenure: the military's dramatically enhanced role in collecting and analyzing intelligence that can be used to thwart terrorist networks worldwide. To accomplish this, Rumsfeld has begun an unprecedented drive to build a Pentagon-based human intelligence apparatus that could one day rival the CIA's clandestine case officer program.

This intelligence-gathering mission trumps most other priorities, including the desire to bring alleged wrongdoers to trial for their role in terrorist plots.

As Rumsfeld explained it in February to the Greater Miami Chamber of Commerce: "What we think about is keeping them off the battlefield so they can't go out and kill more people, immediately interrogating them so we can find out what they know that can prevent future acts of terror against our country . . . and only last is the issue of a crime and some sort of a process that would make a judgment about that crime."

The debate over tactics at Guantanamo appears to have begun in December 2002 when two Navy interrogators heard young military intelligence personnel talking about using techniques that they described to their superiors as "repulsive and potentially illegal."

Navy general counsel Alberto J. Mora brought the issue to the attention of Haynes. Mora's appeals were ignored, however, until he threatened to put his concerns in writing for Haynes, several senior Pentagon officials said. Mora's questions led to the discovery that among the list of "counter-resistance strategies" at Guantanamo were such tactics as using scenarios "designed to convince the detainee that death or severely painful consequences are imminent for him and/or his family," according to an October 2002 memo, and wrapping detainees in wet towels or dripping water on them to make them believe they would suffocate.

Lt. Col. Diane E. Beaver, the legal counsel at Guantanamo then, ruled that those and other techniques -- including 20-hour interrogations, light and sound assaults, stress positions, exposure to cold weather and water -- were legal. She said they could be used with proper oversight and training of interrogators, as long as "there is an important governmental objective, and it is not done for the purpose of causing harm or with the intent to cause prolonged mental suffering."

Interrogators at the detention facilities were particularly interested in using the techniques against two prisoners -- one of them Mohamed al Qahtani, a Saudi detainee who some officials believed may have been the planned 20th hijacker on Sept. 11. Both detainees were considered to have important information about potential future terrorist operations, defense officials have said.

Maj. Gen. Michael Dunlavey, the commander of Guantanamo, agreed, and sent the list of tactics to Gen. James T. Hill, head of the U.S. Southern Command, for approval.

Hill was not as convinced, and wondered in a memo about the legality of some of the techniques. He asked Gen. Richard B. Myers, chairman of the Joint Chiefs of Staff, for guidance. In December, Rumsfeld approved the use of dogs and stripping, but threw out other controversial items.

Rumsfeld also set up a working group of military lawyers and others to deliberate over the range of techniques that might be useful and appropriate. The group came up with 35 techniques. Among the most severe were 20-hour interrogations, face slapping, stripping detainees to create "a feeling of helplessness and dependence," and using dogs to increase anxiety.

The president's directive in February 2002 that ordered U.S. forces to treat al Qaeda and Taliban detainees humanely and consistent with the Geneva Conventions does contain a loophole phrase: "to the extent appropriate and consistent with military necessity."

The working group's report discussed when the "military necessity" exception might be invoked, citing two factors. One was when government officials felt certain that a particular detainee had information needed to prevent an attack. The other factor was a likelihood that a terrorist attack was about to occur and the attack's potential scale.

But the report also noted that "military courts have treated the necessity defense with disfavor and in fact, some have refused to accept necessity as a permissible defense." The rejections have come from judges who objected to the notion of weighing one evil against another, or who feared that acceptance of the necessity argument would open the door to "private moral codes" substituting for the rule of law, the report said.

Other cautionary flags were raised as well. The report warned that use of exceptional techniques could have "adverse effects" on the "culture and self-image" of the armed forces, recalling the damage done in the past by "perceived law of war violations."

It argued that use of such tactics in some cases but not others could create uncertainty among interrogators about the appropriate limits for interrogators. It also noted that, if the tactics became public, the disclosure could undermine confidence in the war on terrorism and in the military tribunal process that was developed for putting detainees on trial.

Rumsfeld eventually pared the list of 35 methods to 24. Most were part of standard military doctrine. Seven, however, went beyond that, including: removing a detainee from the standard interrogation setting and putting him in a less comfortable room; replacing hot rations with cold food or military Meals Ready to Eat; adjusting the temperature to uncomfortable levels or introducing an unpleasant smell; reversing sleep cycles from night to day; deceiving detainees into thinking they were being questioned by people from a country other than the United States.

"The secretary has placed great stock in the legal reviews that have taken place at every level, and has been persuaded each time that he has had to make decisions, that there were sufficient legal reviews along the way," DiRita said.

A suspected Iraqi member of the terrorist group Al Ansar did not receive such a thorough legal review, defense officials said. The man -- identified by U.S. News & World Report as Hiwa AbdulRahman Rashul -- was picked up by Kurdish soldiers in June or July of 2003 and taken outside Iraq by the CIA for interrogation. In October, the CIA's general counsel told the CIA's directorate of operations that it had to bring the man back to Iraq, since all Iraqi detainees were to be accorded treatment under the Geneva Conventions.

Tenet asked Rumsfeld not to give the prisoner a number and to hide him from international Red Cross officials. He became lost in the system for seven months and was not interrogated by CIA or military officials during that time.

In his investigation into the abuse of detainees at Iraq's Abu Ghraib prison, Army Maj. Gen. Antonio M. Taguba had criticized the CIA practice of maintaining such "ghost detainees" and called the practice "deceptive, contrary to Army doctrine and in violation of international law."

Rumsfeld was asked at a news conference last week, "How is this case different from what Taguba was talking about, the ghost detainees?"

"It is just different, that's all," Rumsfeld replied.

"But can you explain how and why?"

"I can't."

Staff writers Mike Allen and R. Jeffrey Smith contributed to this report.

Defense Secretary Donald H. Rumsfeld, right, was key in determining the policy on interrogating detainees. Gen. Richard B. Myers played a role, as well.

Defense Secretary Donald H. Rumsfeld, center, leaves Camp X-Ray, where suspected members of al Qaeda and the Taliban are held at Guantanamo Bay, Cuba.General counsel William J. Haynes II had a Pentagon working group use the Justice Department torture memo as its legal guide.