Is there a text concerning the act of greeting the mosque in the first three rows of the mosque?
Tahiyyat al-Masjid (the prayer of greeting the mosque) is a confirmed Sunnah. So, if one of you enters the mosque, he should not sit until he has prayed two Rak'ahs. It is not a condition for this prayer to be in the first rows, but rather in any place within the mosque. Some Malikis hold the view that it should be prayed at the first point where the Muslim entered.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/38720