The Holy Quran 2:239 — Surah Al-Baqarah
Arabic text
فَإِنْ خِفْتُمْ فَرِجَالًا أَوْ رُكْبَانًا ۖ فَإِذَآ أَمِنتُمْ فَٱذْكُرُوا۟ ٱللَّهَ كَمَا عَلَّمَكُم مَّا لَمْ تَكُونُوا۟ تَعْلَمُونَ
Translation
If you are in fear (in danger), then (you may perform salaah) while standing (walking) or riding (whether you are able to face Qibla or not) and when you return to safety, then remember Allaah (perform salaah) as He had taught you that which you did not know (about the method and etiquette of salaah).
Tafsir (excerpt) — Tafsir Usmani
On the prayer of fear: that is, when it is a time of battle and fear of the enemy, then out of necessity prayer is valid by gestures, both while riding and on foot, even if the face is not towards the qibla.
Preview. The full text opens with JavaScript enabled.