Sunan an-Nasa'i, Book 6, Hadith 598 (In-Book)

It was narrated that Isma'il bin 'Abdur-Rahman, a Shaikh of the Quraish, said: "I accompanied Ibn 'Umar to Al-Hima. [1] When the sun set I felt too nervous to remind him of the prayer, so he went on until the light on the horizon had disappeared and it was getting dark, then he stopped and prayed Maghrib, three Rak'ahs, then he prayed two Rak'ahs immediately afterwards, then he said: 'This what I saw the Messenger of Allah do.'" [1] A place near Madinah.

أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ أَنْبَأَنَا سُفْيَانُ، عَنِ ابْنِ أَبِي نَجِيحٍ، عَنْ إِسْمَاعِيلَ بْنِ عَبْدِ الرَّحْمَنِ، - شَيْخٌ مِنْ قُرَيْشٍ - قَالَ صَحِبْتُ ابْنَ عُمَرَ إِلَى الْحِمَى فَلَمَّا غَرَبَتِ الشَّمْسُ هِبْتُ أَنْ أَقُولَ لَهُ الصَّلاَةَ فَسَارَ حَتَّى ذَهَبَ بَيَاضُ الأُفُقِ وَفَحْمَةُ الْعِشَاءِ ثُمَّ نَزَلَ فَصَلَّى الْمَغْرِبَ ثَلاَثَ رَكَعَاتٍ ثُمَّ صَلَّى رَكْعَتَيْنِ عَلَى إِثْرِهَا ثُمَّ قَالَ هَكَذَا رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَفْعَلُ ‏.‏

sunnah.com