Fresh out of reasons to despair for the human condition? Here’s one: even after the Stalin-era interrogations, the Bataan death march, the Hanoi tiger cages, the atrocities of Abu Ghraib, and the freshly, horribly, unforgettably depicted waterboarding scene in the new film The Railway Man—even after all that—our brains still play cute when it comes to justifying torture.

That’s the conclusion of a new study out of Princeton University’s Woodrow Wilson School of Public and International Affairs. Researchers there recruited 72 volunteers and asked subjects to read fictionalized accounts of real incidents during the wars in Iraq and Afghanistan in which prisoners were abused or tortured for a variety of reasons, including throwing food in a prison cafeteria or refusing to answer questions about an imminent attack. Sometimes it was an American (identified as “Jim Green”) who was the abuser, sometimes it was an enemy soldier (“Jawid Gawri”) abusing an American.

After the subjects read the stories they saw videos of actors reading the accounts aloud, but leaving out the reason for the abuse—reporting only that a prisoner had been beaten with a belt, say, or half-drowned in a bucket of water. This reinforced the subjects’ awareness of the act but created some distance from the justification the attacker used. Later, when the volunteers were asked to describe the incidents in as much detail as they could, they were significantly more inclined to forget the justification when “Jawid” was the abuser than when “Jim” was. In effect, the enemy had no excuse, but the American at least had a colorable cause of action.

This is consistent with a deep body of work showing that all people—very young children included—have a powerful bias toward remembering good things about in-group members and an equal tendency to remember bad things about out-groupers. That, in turn, is a small but significant step toward the dehumanization that allows torture to take place at all.

Certainly, morality is about more than just what we remember at any moment. Most people still condemn torture—at least outwardly—whether Jim or Jawid is the perp. But our brain—the seat of all that is otherwise brilliant and noble about us—nonetheless tries to give us a pass. It’s up to us to say no thanks.

Write to Jeffrey Kluger at jeffrey.kluger@time.com.