Chapter: Greeting the Mosque (1)
Abu Qatadah al-Harith ibn Ribiʿ al-Ansari—may Allah be pleased with him—reported:
The Messenger of Allah ﷺ said, “When any one of you enters the mosque, he must not sit down until he has prayed two rakʿahs.”
Overall meaning
Sulaik al-Ghatafani once entered the Prophet’s Mosque on a Friday while the Prophet ﷺ was delivering the sermon, and he sat down. The Prophet ﷺ told him to stand up and offer two rakʿahs. He ﷺ then explained that mosques possess sanctity and deserve respect: whoever enters should greet the mosque by praying two rakʿahs before sitting. For that reason the Prophet did not excuse this man, even though he had sat merely to listen to the Friday sermon from the Prophet’s own lips ﷺ.
Scholarly disagreement
The jurists have differed over whether it is permissible to perform prayers that are linked to a specific cause—such as the mosque greeting (taḥiyyat al-masjid), the eclipse prayer, the funeral prayer, or making up missed obligatory prayers—during the times in which prayer is prohibited. The Hanafis, Malikis, and Hanbalis hold that it is not permissible, citing the prophetic prohibitions, for example: “There is no prayer after dawn until the sun rises, and no prayer after ʿasr until the sun sets,” and the ḥadith, “There are three hours in which the Messenger of Allah forbade us to pray.”
Imam al-Shafiʿi and a number of scholars consider such prayers permissible without dislike. This is also one report from Imam Ahmad and the view preferred by Shaykh al-Islam Ibn Taymiyyah. They rely on the present ḥadith and others like it, such as, “Whoever sleeps through or forgets his witr, let him perform it when he remembers,” and the ḥadith, “The sun and the moon are two of Allah’s signs; when you see them (in eclipse), then pray.” Each side’s proofs are general in one respect and specific in another; yet in permitting the performance of these prayers