Nowhere in the pages of the Malleus Maleficarum (The Hammer of Witches), a fifteenth-century German book that served as a kind of witch-hunt manual, is there any guidance on what one should do if the witch is innocent. “The idea, apparently, was to keep going until the witch confesses, at which point, you burn her,” says Kurt Gray, a Ph.D. student in social psychology.

Modern victims of torture face similarly poor odds of convincing their tormentors of their innocence, says Gray. In a recent study published in the Journal of Experimental Social Psychology, he and professor of psychology Daniel Wegner found that subjects who underwent “torture” and expressed pain appeared guiltier to those complicit in their torment.

Research participants who showed up for what they believed was a study on morality were introduced briefly to a “partner” (an actress) and then escorted, alone, to a nearby room, where they were told the woman might have cheated in a die-roll experiment to win more money for herself than for her partner. They were also told that the truth is often admitted under stress, and that they’d hear the woman being “tortured” by having her hand immersed in ice water for 80 seconds.

Participants heard one of two scenarios. In the first version, the actress remained stoic throughout, noting the cold, but showing no pain. In the second, she expressed increasing pain: at 10 seconds, she hissed; at 20 seconds, she complained that the water was much colder than she’d expected; at 40 seconds, she “couldn’t wait for it to be over”; at 60 seconds, she “didn’t know how much more she could take.”

Neither version featured a confession, but participants who heard the woman in pain reported a higher likelihood of guilt than those who listened to the woman when she remained unfazed. This result, explain Gray and Wegner, reflects cognitive dissonance—those who took part by listening to the “torture” had a psychological need to justify their complicity, and therefore believed that the pain must be something the tortured person deserved.

But determination of guilt, the study found, is a matter not just of pain, but also of place. In an alternate version of the experiment, participants simply listened to a recorded version of the ice-water “torture.” In this case, the results were flipped: The more pain the victim evinced, the less guilty the participants found her to be. Where cognitive dissonance offered the necessary justification in the first experiments—in which the observer had met the victim and was literally and figuratively closer to her—the researchers offer “moral typecasting” to explain the second outcome. Under that theory, Gray explains, people are seen as either evil agents inflicting pain or blameless victims: “Typecasting suggests that those in victim roles who are harmed and experience pain should be seen as incapable of being immoral.” When study participants had no need to justify their own actions, their sympathetic response of moral typecasting could operate freely.

The study, which Gray says was inspired by real-world torture allegations at Guantánamo Bay, offers an explanation for both government approval, and public disavowal, of such tactics. “In our research, we had people right next door [to the “victim”], but you could imagine the same psychological processes working for someone who feels complicit [for giving] the go-ahead for torture. You see these terrible pictures come across your desk in some confidential dossier, and you think, ‘These guys are really in pain—they must be guilty.’ But for those of us who had no say in torture and don’t feel complicit, when we see those images on our TV screens, we say, ‘Oh, that is terrible—those innocent men.’”

Gray says the experiment suggests that governments that initially advocate torture—or passively allow it—will see it as more justifiable, and thus are more likely to advocate for its use in the future. “You can see the feedback cycle,” he explains: if torturers see their victim’s pain as a sign of guilt, then the approach seems effective and it makes sense to torture more people. In reality, though, he notes, the pain that torture causes “just changes our perception” of the victim, not our knowledge of the facts of the case.