Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:13021Bakr b. Sahl > ʿAbdullāh b. Ṣāliḥ > Muʿāwiyah b. Ṣāliḥ > ʿAlī b. Abū Ṭalḥah

[Machine] Ibn Abbas said about the saying of Allah, "And when you are among them and lead the prayer for them, let a group of them stand [in prayer] with you." (Quran 4:102), that this prayer is performed during times of fear. The Imam stands and a group of them stands with him, and another group takes their weapons and stands facing the enemy. Then the Imam prays one rak'ah with those who are with him, and then sits in his posture while they stand and pray the second rak'ah individually for themselves. The Imam remains seated until they join their companions and stand in their positions, and then others come forward and the Imam prays the second rak'ah for them. This is how the Messenger of Allah ﷺ prayed with the people on the day of the Nakhla palm tree.  

الطبراني:١٣٠٢١حَدَّثَنَا بَكْرُ بْنُ سَهْلٍ ثنا عَبْدُ اللهِ بْنُ صَالِحٍ حَدَّثَنِي مُعَاوِيَةُ بْنُ صَالِحٍ عَنْ عَلِيِّ بْنِ أَبِي طَلْحَةَ

عَنِ ابْنِ عَبَّاسٍ فِي قَوْلِهِ {وَإِذَا كُنْتَ فِيهِمْ فَأَقَمْتَ لَهُمُ الصَّلَاةَ فَلْتَقُمْ طَائِفَةٌ مِنْهُمْ مَعَكَ} فَهَذَا الصَّلَاةُ عِنْدَ الْخَوْفِ يَقُومُ الْإِمَامُ وَيَقُومُ مَعَهُ طَائِفَةٌ مِنْهُمْ وَطَائِفَةٌ يَأْخُذُونَ أَسْلِحَتَهُمْ وَيَقِفُونَ بِإِزَاءِ الْعَدُوِّ فَيُصَلِّي الْإِمَامُ بِمَنْ مَعَهُ رَكْعَةً ثُمَّ يَجْلِسُ عَلَى هَيْئَتِهِ فَيَقُومُونَ فَيُصَلُّونَ لِأَنْفُسِهِمُ الرَّكْعَةَ الثَّانِيَةَ وَالْإِمَامُ جَالِسٌ ثُمَّ يَنْصَرِفُونَ حَتَّى يَأْتُوا أَصْحَابَهُمْ فَيَقِفُونَ مَوْقِفَهُمْ ثُمَّ يُقْبِلُ الْآخَرُونَ فَيُصَلِّي لَهُمُ الْإِمَامُ الرَّكْعَةَ الثَّانِيَةَ فَهَكَذَا «صَلَّى رَسُولُ اللهِ ﷺ بِالنَّاسِ يَوْمَ بَطْنِ نَخْلَةَ»