Does the Prophet's saying: "When any of you enters the mosque, he should pray two rak'ahs before he sits down" indicate obligation or recommendation?
The imams of fatwa have agreed upon the recommendation of the tahiyyat al-masjid (greeting of the mosque prayer), and that the command regarding it is for استحباب (recommendation). It is a Sunnah by the consensus of Muslims. It has been reported from the Dhahiris and Ibn Hazm that they considered it obligatory. Among the proofs used to demonstrate that it is not obligatory is the Prophet's (peace be upon him) prohibition of one who was stepping over people from sitting down, without commanding him to pray, and it is disliked (a mild disliking, karahat tanzih) to sit without praying.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/40134