Mishkat al-Masabih 1420
عَنْ سَالِمِ بْنِ عَبْدِ اللَّهِ بْنِ عُمَرَ عَنْ أَبِيهِ قَالَ: غَزَوْتُ مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قِبَلَ نَجْدٍ فَوَازَيْنَا الْعَدُوَّ فَصَافَفْنَا لَهُمْ فَقَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُصَلِّي لَنَا فَقَامَتْ طَائِفَةٌ مَعَهُ وَأَقْبَلَتْ طَائِفَةٌ عَلَى الْعَدُوِّ وَرَكَعَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِمَنْ مَعَهُ وَسَجَدَ سَجْدَتَيْنِ ثُمَّ انْصَرَفُوا مَكَانَ الطَّائِفَةِ الَّتِي لم تصل فجاؤوا فَرَكَعَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بهم رَكْعَةً وَسَجَدَ سَجْدَتَيْنِ وَرَوَى نَافِعٌ نَحْوَهُ وَزَادَ: فَإِن كَانَ خوف هُوَ أَشَدُّ مِنْ ذَلِكَ صَلَّوْا رِجَالًا قِيَامًا عَلَى أَقْدَامِهِمْ أَوْ رُكْبَانًا مُسْتَقْبِلِي الْقِبْلَةِ أَوْ غَيْرَ مُسْتَقْبِلِيهَا قَالَ نَافِعٌ: لَا أُرَى ابْنَ عُمَرَ ذَكَرَ ذَلِكَ إِلَّا عَنْ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ. رَوَاهُ البُخَارِيّ
From Salim ibn ʿAbdullah ibn ʿUmar, from his father, who said: I went on campaign with the Messenger of Allah ﷺ towards Najd. We faced the enemy and lined up in ranks against them. The Messenger of Allah ﷺ stood to lead us in prayer, and one group stood with him while another group faced the enemy. The Messenger of Allah ﷺ bowed with those who were with him and made two prostrations. Then they withdrew to the place of the group that had not prayed, and those came, and the Messenger of Allah ﷺ bowed with them one rakʿah and made two prostrations. And Nafiʿ reported something similar and added: "If the fear is more severe than that, they pray on foot, standing on their feet, or riding, facing the qiblah or not facing it." Nafiʿ said: "I do not think Ibn ʿUmar mentioned that except from the Messenger of Allah ﷺ." Reported by al-Bukhari.