“A number of sources indicate that Torah study can serve as an effective response during times of war and distress… The Gemara in Masechet Makkot declares that Torah studied in one location can even have an impact upon our soldiers in war in a different location.
Masechet Makkot 10a (R)
Rabbi Yehoshua ben Levi says: What is the meaning of that which is written: “Our feet were standing in your gates, Jerusalem” (Tehillim 122:2)?
What caused our feet to withstand the enemies in war? It is the gates of Jerusalem, where they were engaged in Torah study. He interprets the term ‘in your gates’ to mean: Because of your gates, the place of justice and Torah.”