Imam Bukhari narrates: Yahya narrated to us, he said: Waki' narrated to us from Ali bin al-Mubarak from Yahya bin Abi Kathir from Abi Salamah from Jabir bin Abdullah, may Allāh be pleased with them both, he relates that
on the day of the battle of the Khandaq, Umar, may Allāh be pleased with him, came, and he was denouncing the disbelievers of Quraish and saying: O Messenger of Allāh! I have not yet prayed the Asr prayer, until the sun is about to set. Then the Prophet ﷺ said: By Allāh, I too have not yet prayed the Asr prayer. Then he reached a valley of Madinah, so he performed wudu and led the Asr prayer after the sun had set, then after that he led the Maghrib prayer.
حَدَّثَنَا يَحْيَى بْنُ جَعْفَرٍ البُخَارِيُّ، قَالَ حَدَّثَنَا وَكِيعٌ، عَنْ عَلِيِّ بْنِ مُبَارَكٍ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، عَنْ أَبِي سَلَمَةَ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، قَالَ
جَاءَ عُمَرُ يَوْمَ الخَنْدَقِ، فَجَعَلَ يَسُبُّ كُفَّارَ قُرَيْشٍ، وَيَقُولُ يَا رَسُولَ اللَّهِ، مَا صَلَّيْتُ العَصْرَ حَتَّى كَادَتِ الشَّمْسُ أَنْ تَغِيبَ، فَقَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ وَأَنَا وَاللَّهِ مَا صَلَّيْتُها بَعْدُ قَالَ فَنَزَلَ إِلَى بُطْحَانَ، فَتَوَضَّأَ وَصَلَّى العَصْرَ بَعْدَ مَا غَابَتِ الشَّمْسُ، ثُمَّ صَلَّى المَغْرِبَ بَعْدَهَا
Reference: Sahih Al Bukhari 945