On the day of Al-Khandaq (the battle of trench.) ʿUmar bin Al-Khattab came cursing the disbelievers of Quraish after the sun had set and said, "O Messenger of Allah ﷺ I could not offer the ʿAsr prayer till the sun had set." The Prophet ﷺ said, "By Allah! I, too, have not prayed." So we turned towards Buthan, and the Prophet ﷺ performed ablution and we too performed ablution and offered the ʿAsr prayer after the sun had set, and then he offered the Maghrib prayer.
يَا رَسُولَ اللَّهِ مَا كِدْتُ أُصَلِّي الْعَصْرَ حَتَّى كَادَتِ الشَّمْسُ تَغْرُبُ قَالَ النَّبِيُّ ﷺ وَاللَّهِ مَا صَلَّيْتُهَا فَقُمْنَا إِلَى بُطْحَانَ فَتَوَضَّأَ لِلصَّلاَةِ وَتَوَضَّأْنَا لَهَا فَصَلَّى الْعَصْرَ بَعْدَ مَا غَرَبَتِ الشَّمْسُ ثُمَّ صَلَّى بَعْدَهَا الْمَغْرِبَ