I went to ‘Uqba al-Juhani and said, “I can tell you something about Abu Tamim which will make you wonder. He prays two rak'as before the sunset prayer.” ‘Uqba replied, “We used to do so in the time of God’s Messenger.” I asked, “What prevents you now?” and he replied, “Work.”
Anas said, “When we were in Medina, the moment the mu’adhdhin made the call to the sunset prayer the people hastened to the pillars of the mosque and prayed two rak'as, with the result that any stranger coming into the mosque would think that the obligatory prayer had been observed owing to the number who were praying them.”
Ka‘b b. ‘Ujra said that the Prophet came to the mosque of the B. ‘Abd al-Ashhal and prayed the sunset prayer in it. When the people finished their prayer he saw them performing tasbih after it and said, “This is the prayer to be observed at home.”*
* This refers to supererogatory prayers. Tasbih is the utterance of 'Glory be to God!’
Abu Dawud transmitted it. In the version by Tirmidhi and Nasa’i it says that the people got up and offered supererogatory prayers, whereupon the Prophet said, “Observe this prayer at home.”
I asked Anas b. Malik about the voluntary prayers after the afternoon prayer and he replied, “Umar used to forbid prayer after the afternoon prayer, but in the time of God’s Messenger we used to pray two rak'as after the setting of the sun before the sunset prayer.” I asked him whether God’s Messenger prayed these two and he replied, “He used to see us praying them, but neither commanded us nor forbade us to do so.”