‘Umar said that he heard God’s Messenger say, “Four rak'as before the noon prayer after the sun has passed tne meridian are reckoned equivalent to a similar number at the dawn prayer.1 There is nothing which does not glorify God at that hour.” Then he recited, “Their shadows turn round from the right and the left prostrating themselves to God, and they are abject.”2
1. This is the literal translation, but commentators usually explain it as referring to night prayers at some time between midnight and dawn.
2. Al-Qur’an; 16:48
Tirmidhi and Baihaqi, in Shu'ab al- iman, transmitted it.
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.”
Ibn ‘Abbas reported God’s Messenger as saying, “When the stars set two rak'as should be prayed before the dawn prayer, and after the prostration two rak'as should be prayed after the sunset prayer.”