It is narrated from Jabir bin Abdullah (may Allah be pleased with him) that on the day of the Trench (Khandaq), Umar (may Allah be pleased with him) came to the Messenger of Allah (peace and blessings be upon him) and began to revile the disbelievers, and said: "O Messenger of Allah! I prayed the Asr prayer only when the sun was about to set." He (peace and blessings be upon him) said: "By Allah! I have not been able to pray it even until sunset." Jabir bin Abdullah (may Allah be pleased with him) says: Then we went down to a place called Buthan; he (peace and blessings be upon him) performed ablution and prayed Asr after sunset, and then prayed Maghrib after it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3186
(a) It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that we were with the Messenger of Allah (peace and blessings be upon him), lined up facing the enemy. The enemy kept the Messenger of Allah (peace and blessings be upon him) occupied from the Zuhr, Asr, Maghrib and Isha prayers until it was midnight. Then the Messenger of Allah (peace and blessings be upon him) stood up, began with Zuhr, then Asr, Maghrib and Isha, and offered all the prayers in order.
(b) Al-Walid bin Muslim added, through Abu Amr al-Awza'i, that he offered them one after another, each with its own iqamah; this has been mentioned before.
(c) This hadith was narrated to us through Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) from the Prophet (peace and blessings be upon him) in the matter of the adhan.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3188