the dawn prayer, and then hold back from any further prayer until the sun has risen and climbed higher. For it rises—when it rises—between the two horns of Satan, and at that moment the unbelievers prostrate to it. After that, pray, for the prayer offered then is witnessed and attended, until the shadow of a spear stands straight. Then desist from prayer, for at that time Hell-fire is stoked. When the shadow begins to lengthen, pray, for that prayer is witnessed and attended, until you have performed the ‘Asr prayer. Then refrain from prayer until the sun sets, for it sets between the two horns of Satan, and at that moment the unbelievers prostrate to it.” He went on to mention the rest of the ḥadīth, which is reported by Muslim.
Thus the Prophet—may Allah bless him and grant him peace—forbade praying at sunrise and at sunset, giving as the reason that the sun rises and sets between the two horns of Satan and that the unbelievers prostrate to it at those times.
It is clear that a believer intends to prostrate to none but Allah Most High, and most people are unaware that the sun’s rising and setting occur between the two horns of Satan, or that the unbelievers prostrate