The Messenger of Allah ﷺ camped between Dajnan and Usfan. The polytheists said, "These people have a prayer that is dearer to them than their fathers and their firstborn children." This was the afternoon prayer. They said, "Get ready, and let us launch a single sweeping attack against them."Then Jibreel came to the Prophet ﷺ and instructed him to divide his companions into two groups. He would lead one group in prayer while the other group stood behind them, remaining alert and keeping hold of their weapons. Then the second group would come forward and pray with him, while the first group took their turn staying watchful with their weapons. In this way each group would have one rakah with the Messenger of Allah ﷺ, while the Messenger of Allah ﷺ himself prayed two rakahs.
أن رسول الله ﷺ نزل بين ضجنان وعسفان. فقال المشركون: إن لهؤلاء صلاة هي أحب إليهم من آبائهم وأبكارهم- وهي العصر- فأجمعوا أمركم فيميلوا عليهم ميلة واحدة، وإن جبريل عليه السلام أتى النبي ﷺ فأمره أن يقسم أصحابه شطرين فيصلي ببعضهم، وتقوم الطائفة الأخرى وراءهم، وليأخذوا حذرهم وأسلحتهم، ثم تأتي الأخرى فيصلون معه، ويأخذ هؤلاء حذرهم وأسلحتهم لتكون لهم ركعة ركعة مع رسول الله ﷺ، ولرسول الله ﷺ ركعتان.
Tirmidhi (3035), Nasai (1544), and Ahmad (10765) all narrated it, both from the hadith of Abdul-Samad bin Abdul-Warith, who said, Saeed bin Ubayd Hinai told us, Abdullah bin Shaqiq told us, who said, Abu Hurairah told us, and then he mentioned it.Its chain is hasan because of Saeed bin Ubayd Hinai, about whom Abu Hatim said, "A shaykh," while Bazzar said, "There is no harm in him," and Hafiz relied on him in Taqrib. Ibn Hibban also mentioned him in Thiqat.For more, see, the prayer of fear, which was the first prayer of fear that the Messenger of Allah performed ﷺ.