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

Let not any one of you intend to observe prayer at the time of the rising of the sun or of the setting sun.

Comment

The Book of Prayer - Travellers

Author: Sahih Muslim | Hadith Reference: Sahih Muslim 828 a

Prohibition Explained

This prohibition concerns the specific times when the sun is rising and setting, for during these moments the disbelievers prostrate to the sun. The Muslim is thus commanded to distinguish their worship from that of the polytheists.

Scholarly Commentary

The wisdom behind this prohibition is to avoid any resemblance to the practice of sun-worshippers, who would direct their acts of devotion to the sun at these precise times. It is a matter of maintaining the purity of Islamic monotheism (Tawhid).

Furthermore, these are times when the gates of heaven are not open for the acceptance of voluntary prayers. The only exception to this ruling is the performance of the obligatory (Fard) prayer of 'Asr on that specific day, which may be prayed until the sun begins to set, provided its time was entered before the prohibition began.

Practical Application

One must not initiate any prayer, whether obligatory or supererogatory, when the sun's disc is visibly rising until it is fully risen and distinct from the horizon, and likewise when it is visibly setting until it has completely disappeared.