When the rim of the sun starts appearing defer prayer till it completely appears, and when the rim of the sun disappears defer prayer till it completely disappears.
The Book of Prayer - Travellers
Author: Sahih Muslim | Hadith Reference: Sahih Muslim 829
Textual Analysis
This noble hadith prohibits offering prayer during the precise moments of sunrise and sunset, commanding believers to defer prayer until the sun has fully risen above the horizon or completely set below it.
Juridical Ruling
The consensus of classical scholars holds that it is forbidden (haram) to perform voluntary prayers during these two specific times. This prohibition applies even if one commenced prayer before these moments and finds oneself in them during the prayer.
Wisdom Behind the Prohibition
Scholars mention several divine wisdoms: First, these are times when the polytheists would prostrate to the sun, and Islam distinguishes its worship from all others. Second, these are moments of rapid change in creation that invite reflection upon Allah's power rather than formal prayer. Third, it prevents confusion between the times of obligatory prayers.
Exceptions and Applications
This prohibition applies specifically to voluntary prayers. Obligatory prayers missed during their proper time (qada) may be made up during these periods. The duration of prohibition is approximately 15-20 minutes after sunrise and before sunset according to most classical calculations.