The psychology of a terrorist is, needless to say, complex, sometimes baffling. But a new study may provide an important clue to the violent fanatic's mindset.

It finds people perceive threatening adversaries as less formidable when they have God or other supernatural forces on their mind. Presuming that's true of Islamic terrorists, this perception could make the fighters more confident in their ability to fend off anyone who might get between them and their targets.

These results support "the growing literature that religious cognition can potentiate aggression by attenuating the perceived threat that enemies pose," writes a research team led by University of California–Los Angeles anthropologist Colin Holbrook.

Spirituality, the researchers note, can inspire "both belligerence and peaceful coexistence." This appears to be one way it promotes aggression.

In the journal Cognition, the researchers describe two studies that provide evidence for their theory. The first featured 253 adults recruited online via Amazon's Mechanical Turk, all of whom began by unscrambling 10 series of words to reveal coherent sentences.

For half the participants, five of the scrambled sentences contained references to God or closely related concepts such as "sacred" or "spirit." For the others, all the sentences had no religious content.

Afterwards, "participants estimated the bodily traits of a threatening male based on a cropped facial photograph." The image was "a composite of 25 different men displaying a neutral expression"; the man was described as a convicted armed robber.

All participants were then asked to estimate this threatening man's height, size, and muscularity. As the researchers suspected, he was viewed as significantly less formidable by participants who had been primed with religious concepts.

The second, similarly structured study (which featured 689 adults) once again found thoughts of religion prompted people to perceive the man as less dangerous. Compared to the control group, people with God on their minds estimated him as smaller in overall size and less muscular.

"Our results complement the longstanding claim that religious faith can palliate anxiety towards threats," the researchers conclude. "In environments rife with interpersonal violence, believing that one is supernaturally supported may facilitate overestimating one's prospects of winning in a conflict."

"Such 'positive illusions' can adaptively promote success by hardening resolve to fight, or intimidating opponents," they add.

It's important to note that the researchers were not specifically studying terrorists, but were rather exploring the evolutionary roots of human behavior. As they note, an important next step is testing to determine whether more overt reminders of religion, such as prayer, have the same effect.

Nevertheless, these are intriguing findings. They suggest fighters who are motivated by religion may have a psychological advantage — an invisible ally who shifts their perspective in an inspiring way.

Pacific Standard grapples with the nation's biggest issues by illuminating why we do what we do. For more on the science of society, sign up for its weekly email update or subscribe to its bimonthly print magazine.