ʿ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 Messenger of Allah ﷺ! 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.
يَا رَسُولَ اللَّهِ مَا كِدْتُ أَنْ أُصَلِّيَ حَتَّى كَادَتِ الشَّمْسُ أَنْ تَغْرُبَ قَالَ النَّبِيُّ ﷺ وَاللَّهِ مَا صَلَّيْتُهَا فَنَزَلْنَا مَعَ النَّبِيِّ ﷺ بُطْحَانَ فَتَوَضَّأَ لِلصَّلاَةِ وَتَوَضَّأْنَا لَهَا فَصَلَّى الْعَصْرَ بَعْدَ مَا غَرَبَتِ الشَّمْسُ ثُمَّ صَلَّى بَعْدَهَا الْمَغْرِبَ