[Machine] The Messenger of Allah ﷺ prayed the prayer of fear with a group carrying monkeys. He lined them up in rows, with a row parallel to the enemy. He prayed a Rak'ah with them, then these people went to the forefront, and those people came and prayed a Rak'ah with the Prophet ﷺ , then they greeted him. Sufyan said: The Prophet ﷺ prayed two Rak'ahs and each group prayed one Rak'ah.
صَلَّى رَسُولُ اللهِ ﷺ صَلَاةُ الْخَوْفِ بِذِي قَرَدٍ فَصَفَّ خَلْفَهُ صَفٌّ وَصَفٌّ مُوَازِي الْعَدُوِّ فَصَلَّى بِهِمْ رَكْعَةً ثُمَّ ذَهَبَ هَؤُلَاءِ إِلَى مَصَافِّ أُولَئِكَ وَجَاءَ أُولَئِكَ فَصَلُّوا مَعَ النَّبِيِّ ﷺ رَكْعَةً ثُمَّ سَلَّمَ عَلَيْهِمْ قَالَ سُفْيَانُ فَكَانَ لِلنَّبِيِّ ﷺ رَكْعَتَيْنِ وَلِكُلِّ طَائِفَةٍ رَكْعَةٌ