On the day of the Battle of the Trench, we were prevented from performing our prayers until well after sunset. This was before the verse concerning fighting was revealed. When we were spared from further fighting, as Allah says, "And Allah spared the believers from fighting, and Allah is ever Strong and Mighty" [Ahzab 33:25], the Prophet ﷺ ordered Bilal to call the iqamah for the noon prayer, and he prayed it just as he would pray it in its proper time. Then Bilal called the iqamah for the afternoon prayer, and he prayed it just as he would pray it in its proper time. Then Bilal called the iqamah for the sunset prayer, and he prayed it just as he would pray it in its proper time.
حدثنا يحيى حدثنا ابن أبي ذئب حدثنا سعيد بن أبي سعيد
حبسنا يوم الخندق عن الصلوات حتى كان بعد المغرب هويا وذلك قبل أن ينزل في القتال ما نزل فلما كفينا القتال وذلك قوله {وكفى الله المؤمنين القتال وكان الله قويا عزيزا} أمر النبي ﷺ بلالا فأقام الظهر فصلاها كما يصليها في وقتها ثم أقام العصر فصلاها كما يصليها في وقتها ثم أقام المغرب فصلاها كما يصليها في وقتها
Its isnad is sahih, all of them being trustworthy. Saeed bin Abu Saeed is al-Maqburi. The hadith was narrated by Tirmidhi 1/337, no. 179, in the Book of Prayer, in the chapter on what has been said regarding a man who misses the prayer, by Nasai 1/297, no. 6220, and by Darimi 1/430, no. 1524.