Fear strengthens religious belief as seen in a combat study.
As combat was more frightening, the percentage of soldiers who reported praying rose from 42 to 72%.
In addition, another combat study reviewing combat veterans half a century later showed religion faith varied by their war experience and their positive or negative reactions to or about the war. As in ones who had more negative experience and reactions to or about the war the more religious they were. Soldiers who faced heavy combat attended church around twenty percent more often if they claimed their war experience was negative, but those who claimed their experience was positive attended church over twenty five percent less often.
This highlights that those who try to say there are no atheists in foxholes, are not forming an argument against atheism, but instead are forming an argument against foxholes (war) and how fear is a large motivator for creating religionists/fideists.