Jabir bin Abdullah reported,

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.

Bukhari 4112

Sahih

حدثنا المكي بن إبراهيم حدثنا هشام عن يحيى عن أبي سلمة

عن جابر بن عبد الله

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

البخاري 4112صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Battle of Khandaq, which is Ahzab
Numbering
Darussalam 4112
Bukhari 4112