عَنْ عِكْرِمَةَ مَوْلَى ابْنِ عَبَّاسٍ عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُمَا قَالَ: مَا كَانَتْ صَلَاةُ الْخَوْفِ إِلَّا كَصَلَاةِ أَحْرَاسِكُمْ هَؤُلَاءِ الْيَوْمَ خَلْفَ أَئِمَّتِكُمْ، إِلَّا أَنَّهَا كَانَتْ عُقْبًا، قَامَتْ طَائِفَةٌ وَهُمْ جَمِيعٌ مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ وَسَجَدَتْ مَعَهُ طَائِفَةٌ، ثُمَّ قَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ وَسَجَدَ الَّذِينَ كَانُوا قِيَامًا لِأَنْفُسِهِمْ، ثُمَّ قَامَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ وَقَامُوا مَعَهُ جَمِيعًا، ثُمَّ رَكَعَ وَرَكَعُوا مَعَهُ جَمِيعًا، ثُمَّ سَجَدَ فَسَجَدَ الَّذِينَ كَانُوا مَعَهُ قِيَامًا أَوَّلَ مَرَّةٍ وَقَامَ الْآخَرُونَ الَّذِينَ كَانُوا سَجَدُوا مَعَهُ أَوَّلَ مَرَّةٍ، فَلَمَّا جَلَسَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ وَالَّذِينَ سَجَدُوا مَعَهُ فِي آخِرِ صَلَاتِهِمْ سَجَدَ الَّذِينَ كَانُوا قِيَامًا لِأَنْفُسِهِمْ ثُمَّ جَلَسُوا، فَجَمَعَهُمْ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ بِالسَّلَامِ
Sayyiduna Abdullah bin Abbas says that the prayer of fear was performed in the same way as your present-day guards perform it behind the imams, except that their prayer was performed alternately and all of them would stand behind the Messenger of Allah, peace and blessings be upon him. All the people would stand behind him and begin the prayer; when the Messenger of Allah, peace and blessings be upon him, would go into prostration, the people in the first row would prostrate with him, while those in the back row would remain standing. When the Messenger of Allah, peace and blessings be upon him, would stand up after the prostrations, those in the back row, who had remained standing, would then perform their prostration, and then all would stand up (for the second rak‘ah). Then, when the Messenger of Allah, peace and blessings be upon him, would bow, everyone would bow with him, and when he would prostrate, those who had remained standing in the first rak‘ah would prostrate with him, and those who had prostrated with him the first time would now remain standing. When the Messenger of Allah, peace and blessings be upon him, and one row would sit (for tashahhud) after the prostrations, those who had remained standing would perform their prostration and then sit, and then the Messenger of Allah, peace and blessings be upon him, would include all the people in the final salutation.