It is narrated from Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) that on the Day of the Trench we were with the Messenger of Allah (peace and blessings be upon him) facing the enemy. The enemy kept the Messenger of Allah (peace and blessings be upon him) occupied from Zuhr, Asr, Maghrib and Isha until it was midnight. Then the Messenger of Allah (peace and blessings be upon him) stood up and he (peace and blessings be upon him) began with Zuhr, then offered Asr, then Maghrib and then Isha, one after another, with an iqamah for each.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 1915