فَإِنْ خِفْتُمْ فَرِجَالًا أَوْ رُكْبَانًا ۖ فَإِذَآ أَمِنتُمْ فَٱذْكُرُوا۟ ٱللَّهَ كَمَا عَلَّمَكُم مَّا لَمْ تَكُونُوا۟ تَعْلَمُونَ Qur’an Al-Baqara (2:239)Fain khiftum farij a lan aw rukb a nan fai tha amintum fa o th kuroo All a ha kam a AAallamakum m a lam takoonoo taAAlamoon a
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.
Verses 238-39 are parenthetical, introducing the subject of prayer in danger. This is more fully dealt with in iv. 101-03.