Hadithcore
Sahih al-Bukhari, 503
sahih

Narrated Anas:

I saw the most famous people amongst the companions of the Prophet (ﷺ) hurrying towards the pillars at the Maghrib prayer before the Prophet (ﷺ) came for the prayer.

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

References2 variants
In-Book Reference
Book 8, Hadith 150
USC-MSA web (English) reference
Vol. 1, Book 9, Hadith 482 (deprecated numbering scheme)
Sharh · explanationclick to expand
The Sahabah (may Allah be pleased with them) learned the prayer and its times, and the Sunnah prayers to be offered before and after the obligatory prayers, from the Prophet (blessings and peace of Allah be upon him). They were keen to do supererogatory deeds and Sunnah actions in general in the best manner and at the correct times. In this hadith, Anas ibn Malik (may Allah be pleased with him) narrates that he saw the senior companions of the Prophet (blessings and peace of Allah be upon him) hastening towards the pillars after the adhan of Maghrib. In other words, they would race one another to those spots, so that the pillars might be sutrahs for them whilst they prayed two rak‘ahs before Maghrib prayer. Their aim in racing to the pillars was so that they might use them as sutrahs to screen them from anyone who walked in front of them, because they were praying individually, praying two rak‘ahs until the Prophet (blessings and peace of Allah be upon him) came out of his apartment. This indicates that the Prophet (blessings and peace of Allah be upon him) approved of this action of theirs, as he saw them and did not tell them not to do that. According to a report narrated by an-Nasa’i: There was hardly any time between the adhan and iqamah; in other words, there was not a long time between them. It is as if they were hastening to pray the two rak‘ahs because the time between the adhan and iqamah was so short. This hadith indicates that the worshipper may use a pillar in the mosque as a sutrah. It also indicates that it is prescribed to offer a nafil prayer before Maghrib..