Umar bin Khattab came on the day of the Trench after the sun had set and began cursing the disbelievers of Quraysh. He said, "Messenger of Allah, I could hardly pray the afternoon prayer until the sun was about to set."The Prophet ﷺ replied, "By Allah, I have not prayed it either."So we went down with the Prophet ﷺ to Buthan. He performed ablution for the prayer and we performed ablution as well. He then prayed the afternoon prayer after the sun had set, and afterwards prayed the sunset prayer.
حدثنا المكي بن إبراهيم حدثنا هشام عن يحيى عن أبي سلمة
أن عمر بن الخطاب رضي الله عنه جاء يوم الخندق بعد ما غربت الشمس جعل يسب كفار قريش وقال يا رسول الله ما كدت أن أصلي حتى كادت الشمس أن تغرب قال النبي ﷺ والله ما صليتها فنزلنا مع النبي ﷺ بطحان فتوضأ للصلاة وتوضأنا لها فصلى العصر بعدما غربت الشمس ثم صلى بعدها المغرب