When Cmdr. James Stockdale parachuted out of his nose-diving Skyhawk over the North Vietnamese jungle in September 1965, the war was still young. Little was known about the fate that awaited American prisoners of war. It didn't take Stockdale long to gain a clearer sense. After a few months in solitary confinement in Hoa Lo prison in Hanoi, he was introduced to "the ropes," a torture technique in which a prisoner was seated on the floor -- legs extended, arms bound behind him -- as a guard stood on his back and drove his face down until his nose was mashed into the brick floor between his legs. The North Vietnamese knew they were overmatched militarily, but they figured they could at least win the propaganda war by brutalizing American P.O.W.'s until they denounced their government and "confessed" that they had bombed schoolchildren and villagers.

For his part, Stockdale intended to return home with his honor intact. One afternoon, he was given a razor and led to the bathroom -- a sure sign that he was being readied for a propaganda film. Instead of shaving, Stockdale gave himself a reverse Mohawk, tearing up his scalp in the process. More determined than ever now, his captors locked him in the interrogation room for a few minutes while they fetched a hat for him. Stockdale glanced around, looking for an appropriate weapon. He considered a rusty bucket and a windowpane before settling on a 50-pound stool, and proceeded to beat himself about the face. Then, realizing that his eyes were not yet swollen shut, he beat himself some more. By the time the guards had returned, blood was running down the front of his shirt. For the next several weeks, Stockdale kept himself unpresentable by surreptitiously bashing his face with his fists. The North Vietnamese never did manage to film him.

As Hoa Lo filled with American shootdowns -- it would become known among prisoners as the Hanoi Hilton -- Stockdale transformed a loose colony of destabilized P.O.W.'s into a tightly knit underground resistance movement with its own language (an alphabetical tap code) and laws. Stockdale was the highest-ranking Navy P.O.W., but his authority derived less from seniority than from that rare blend of virtues that enables a small minority of men to thrive in what the Prussian military philosopher Karl von Clausewitz called the province of danger.

Inside the interrogation room, the military's Code of Conduct, which presupposes adherence to the Geneva Conventions, was of little value. The torture was simply too intense to limit statements to name, rank, serial number and date of birth. So Stockdale created new rules designed both to protect America's war effort and to keep P.O.W.'s alive. Stockdale ordered his men to endure as much physical abuse as they could before acceding to any of their interrogators' demands -- the key, in his view, to preserving a sense of dignity -- and to always confess to fellow inmates everything they had been forced to divulge. To carry an unclean conscience was to risk descending into a spiral of guilt and shame that would make them only more vulnerable to themselves and their captors.