Before the United States permitted a terrifying way of interrogating prisoners, government lawyers and intelligence officials assured themselves of one crucial outcome. They knew that the methods inflicted on terrorism suspects would be painful, shocking and far beyond what the country had ever accepted. But none of it, they concluded, would cause long lasting psychological harm.

Fifteen years later, it is clear they were wrong.

Today in Slovakia, Hussein al-Marfadi describes permanent headaches and disturbed sleep, plagued by memories of dogs inside a blackened jail. In Kazakhstan, Lutfi bin Ali is haunted by nightmares of suffocating at the bottom of a well. In Libya, the radio from a passing car spurs rage in Majid Mokhtar Sasy al-Maghrebi, reminding him of the C.I.A. prison where earsplitting music was just one assault to his senses.

And then there is the despair of men who say they are no longer themselves. “I am living this kind of depression,” said Younous Chekkouri, a Moroccan, who fears going outside because he sees faces in crowds as Guantánamo Bay guards. “I’m not normal anymore.”

After enduring agonizing treatment in secret C.I.A. prisons around the world or coercive practices at the military detention camp at Guantánamo Bay, Cuba, dozens of detainees developed persistent mental health problems, according to previously undisclosed medical records, government documents and interviews with former prisoners and military and civilian doctors. Some emerged with the same symptoms as American prisoners of war who were brutalized decades earlier by some of the world’s cruelest regimes.