ʿ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. (Using translation from Bukhārī 4112)
وَقَالَ يَا رَسُولَ اللهِ مَا كِدْتُ أَنْ أُصَلِّي حَتَّى كَادَتِ الشَّمْسُ تَغْرُبُ فَقَالَ رَسُولُ اللهِ ﷺ «فَوَاللهِ مَا صَلَّيْتُهَا» فَنَزَلْنَا مَعَ رَسُولِ اللهِ ﷺ بَطْحَانَ «فَتَوَضَّأَ لِلصَّلَاةِ وَتَوَضَّأْنَا لَهَا فَصَلَّى الْعَصْرَ بَعْدَمَا غَرَبَتِ الشَّمْسُ ثُمَّ صَلَّى بَعْدَهَا الْمَغْرِبَ»