239فَإِن خِفتُم فَرِجالًا أَو رُكبانًا ۖ فَإِذا أَمِنتُم فَاذكُرُوا اللَّهَ كَما عَلَّمَكُم ما لَم تَكونوا تَعلَمونَMuhammad AsadBut if you are in danger, [pray] walking or riding;1 and when you are again secure, bear God in mind - since it is He who taught you what you did not previously know.This relates to any dangerous situation - for instance, in war - where remaining for any length of time at one place would only increase the peril: in such an event, the obligatory prayers may be offered in any way that is feasible, even without consideration of the qiblah.