حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنْ مُحَمَّدِ بْنِ يَحْيَى بْنِ حَبَّانَ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَهَى عَنِ الصَّلاَةِ بَعْدَ الْعَصْرِ حَتَّى تَغْرُبَ الشَّمْسُ وَعَنِ الصَّلاَةِ بَعْدَ الصُّبْحِ حَتَّى تَطْلُعَ الشَّمْسُ ‏.‏
Translation
Ibn 'Umar reported Allah's Messenger (ﷺ) as saying

Do not intend to observe prayer at the time of the rising of the sun nor at its setting, for it rises between the horns of Satan.

Comment

The Book of Prayer - Travellers

Sahih Muslim 828 b

Hadith Text

"Do not intend to observe prayer at the time of the rising of the sun nor at its setting, for it rises between the horns of Satan."

Scholarly Commentary

This noble hadith prohibits the voluntary prayer at two specific times: sunrise and sunset. The wisdom behind this prohibition is that these are times when the disbelievers would prostrate to the sun, and thus Muslims must distinguish their worship from polytheistic practices.

The phrase "between the horns of Satan" is a metaphorical expression indicating that the sun at these times appears in a manner that Satan uses to deceive people and lead them to shirk (associating partners with Allah). It is a time when Satan's influence is particularly strong, and thus Muslims should avoid acts that might be confused with sun worship.

This prohibition applies specifically to voluntary prayers, not obligatory ones. If the time for obligatory prayer coincides with sunrise or sunset, one must still perform the obligatory prayer. The wisdom is to maintain the purity of Islamic worship and avoid any resemblance to practices of disbelief.

Practical Application

The prohibited time for prayer at sunrise begins when the sun starts to appear until it has fully risen and become distinct. The prohibited time at sunset begins when the sun starts to yellow before setting until it has completely disappeared below the horizon.

Exceptions to this prohibition include making up missed obligatory prayers and the two rak'ahs of Tawaf (circumambulation around the Ka'bah). The learned scholars have also stated that one may perform prostrations of recitation during these times if required.