Abu Hurairah reported,

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 sons, namely the afternoon prayer. So gather your forces and launch a single, decisive 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, keeping watch with their weapons ready. Then the others would come forward and pray one rakah with him, while the first group took up their weapons and stood guard. In this way, each group prayed one rakah, while the Messenger of Allah ﷺ prayed two.

Tirmidhi 3035

Sahih

حدثنا محمود بن غيلان حدثنا عبد الصمد بن عبد الوارث حدثنا سعيد بن عبيد الهنائي حدثنا عبد الله بن شقيق

حدثنا أبو هريرة

أن رسول الله ﷺ نزل بين ضجنان وعسفان فقال المشركون إن لهؤلاء صلاة هي أحب إليهم من آبائهم وأبنائهم هي العصر فأجمعوا أمركم فميلوا عليهم ميلة واحدة وأن جبريل أتى النبي ﷺ فأمره أن يقسم أصحابه شطرين فيصلي بهم وتقوم طائفة أخرى وراءهم وليأخذوا حذرهم وأسلحتهم ثم يأتي الآخرون ويصلون معه ركعة واحدة ثم يأخذ هؤلاء حذرهم وأسلحتهم فتكون لهم ركعة ركعة ولرسول الله ﷺ ركعتان

الترمذي 3035صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Tafsir of the Quran
Chapter
From Surah Al Imran
Numbering
Darussalam 3035
Tirmidhi 3035