كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(29)
Chapter: The Ghazwa of Al-Khandaq or Al-Ahzab Battle
(29)
باب غَزْوَةُ الْخَنْدَقِ وَهْىَ الأَحْزَابُ
Sahih al-Bukhari 4112

Narrated Jabir bin `Abdullah:

`Umar bin Al-Khattab came on the day of Al-Khandaq after the sun had set and he was abusing the infidels of Quraish saying, "O Allah's Messenger (ﷺ)! I was unable to offer the (`Asr) prayer till the sun was about to set." The Prophet (ﷺ) said, "By Allah, I have not offered this (i.e. `Asr) prayer." So we came down along with the Prophet (ﷺ) to Buthan where he performed ablution for the prayer and then we performed the ablution for it. Then he offered the `Asr prayer after the sun had set, and after it he offered the Maghrib prayer.

حَدَّثَنَا الْمَكِّيُّ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا هِشَامٌ، عَنْ يَحْيَى، عَنْ أَبِي سَلَمَةَ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، أَنَّ عُمَرَ بْنَ الْخَطَّابِ ـ رضى الله عنه ـ جَاءَ يَوْمَ الْخَنْدَقِ بَعْدَ مَا غَرَبَتِ الشَّمْسُ جَعَلَ يَسُبُّ كُفَّارَ قُرَيْشٍ قَالَ يَا رَسُولَ اللَّهِ مَا كِدْتُ أَنْ أُصَلِّيَ حَتَّى كَادَتِ الشَّمْسُ أَنْ تَغْرُبَ‏.‏ قَالَ النَّبِيُّ صلى الله عليه وسلم ‏ "‏ وَاللَّهِ مَا صَلَّيْتُهَا ‏"‏ فَنَزَلْنَا مَعَ النَّبِيِّ صلى الله عليه وسلم بُطْحَانَ، فَتَوَضَّأَ لِلصَّلاَةِ وَتَوَضَّأْنَا لَهَا، فَصَلَّى الْعَصْرَ بَعْدَ مَا غَرَبَتِ الشَّمْسُ، ثُمَّ صَلَّى بَعْدَهَا الْمَغْرِبَ‏.‏
Reference : Sahih al-Bukhari 4112
In-book reference : Book 64, Hadith 156
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 438
  (deprecated numbering scheme)