Which is more proper: to offer salaams upon entering the mosque, or to first perform the two rak'ahs of 'Tahiyyat al-Masjid' (greeting the mosque prayer)?
It is legislated for whoever enters the mosque to pray two rak'ahs as a greeting to the mosque before sitting down, due to the saying of the Prophet, peace and blessings be upon him: "When any of you enters the mosque, let him not sit down until he prays two rak'ahs." There is no contradiction between greeting the mosque and offering salutations (salaam). The one entering can offer salutations first, then perform the greeting to the mosque. The greeting to the mosque is tied to sitting down, so there is no harm in delaying it as long as one has not sat down. As for greeting a Muslim, it is tied to meeting them. If the congregation is far away, the one who enters the mosque can pray the greeting to the mosque first, then go and greet them.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/11645