- Home
- Tahiyatul masjid
Salah
Tahiyatul Masjid: The Two Rakats for Greeting the Mosque, When to Pray Them and How
Two rakats on entering the mosque before you sit: the hadith, how to pray them, and when the schools say to leave them
Tahiyatul masjid, “greeting the mosque”, is two rakats prayed when you enter a mosque, before you sit down. The Prophet (peace be upon him) said: when one of you enters the mosque, let him not sit until he has prayed two rakats (Sahih al-Bukhari and Sahih Muslim). It is a sunnah for men and women. Any prayer you pray on entering, such as the sunnah of the coming prayer, also counts as it. Here is how to pray tahiyatul masjid, its niyat, and what the schools say about praying it during the khutbah or at the forbidden times.

Tahiyatul masjid in the sunnah
(يَبْدَأُ بِرِجْلِهِ الْيُمْنَى) ، وَيَقُولُ: ((أَعُوذُ بِاللَّهِ العَظِيمِ، وَبِوَجْهِهِ الْكَرِيمِ، وَسُلْطَانِهِ الْقَدِيمِ، مِنَ الشَّيْطَانِ الرَّجِيمِ)) [بِسْمِ اللَّهِ، وَالصَّلَاةُ] [وَالسَّلَامُ عَلَى رَسُولِ اللَّهِ] ((اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ)).
(aAAoothu billahil-AAatheem wabiwajhihil-kareem wasultanihil-qadeem minash-shaytanir-rajeem, [bismil-lah, wassalatu] [wassalamu AAala rasoolil-lah] , allahumma iftah lee abwaba rahmatik.)
(I take refuge with Allah, The Supreme and with His Noble Face, and His eternal authority from the accursed devil. In the name of Allah, and prayers and peace be upon the Messenger of Allah. O Allah, open the gates of Your mercy for me.)
- Enter with the right foot and say the dua for entering the mosque, shown above.
- Pray two rakats before sitting, as the Prophet commanded in the hadith of Abu Qatadah (Sahih al-Bukhari and Sahih Muslim).
- Then sit, read, make dhikr or wait for the prayer.
Most scholars say it is a sunnah, not an obligation. If you sit down first by forgetting, many scholars say stand and pray it if little time has passed.
How to pray tahiyatul masjid
- Niyat: two rakats of tahiyatul masjid for Allah. (Niat solat sunat tahiyatul masjid, in Malay.)
- Prayer: as any two-rakat nafl, with Al-Fatiha and a surah in each, ruku, two sajdahs, tashahhud and salam. Keep it brief if the congregation is about to start.
- It is covered by other prayers: if you enter and pray the sunnah of Zuhr, or join the fard, that counts as greeting the mosque. You do not need two separate prayers.
See namaz ka tarika for the method.
Tahiyatul masjid during the khutbah
- Shafi’i and Hanbali: pray two short rakats, then sit. A man came in while the Prophet was giving the Friday sermon and sat; the Prophet told him to stand and pray two rakats, light ones (Sahih Muslim).
- Hanafi and Maliki: sit and listen; once the imam has come out, prayer and talk stop, so as to listen to the sermon.
Follow your scholar or the practice of your mosque. See jumma namaz rakats.
Tahiyatul masjid at the forbidden times
If you enter after Fajr or after Asr, or at sunrise, midday or sunset:
- Shafi’i: pray it, as it is a prayer with a reason.
- Hanafi and Maliki: do not pray it at those times; sit and make dhikr instead.
- Hanbali: the main view is not to pray it then, with a well-known view allowing it.
When the iqamah is called
If the iqamah for the fard has begun, do not start tahiyatul masjid; join the congregation. The fard counts in its place.
Written for DonateOpenly from the sources it cites, and awaiting review by ulama. Dates are worked out from the Islamic calendar and depend on the moon sighting.
Choose a charity, then give on its own website
Every registered UK Muslim charity has a page on DonateOpenly: what it does, where its work reaches people and where donors review it.
Tahiyatul masjid: questions
What is tahiyatul masjid?
Two rakats prayed on entering a mosque before sitting down, as a greeting of the mosque.
Is tahiyatul masjid compulsory?
No. Most scholars hold it is a sunnah. The Prophet commanded it in the hadith in Sahih al-Bukhari and Sahih Muslim.
Can I pray tahiyatul masjid after Asr?
The Shafi’i school says yes; the Hanafi and Maliki schools say no, as after Asr is a time voluntary prayer is avoided.
Do women pray tahiyatul masjid?
Yes, when entering a mosque, in the same way.
What did the Prophet say about tahiyatul masjid?
“When one of you enters the mosque, let him not sit until he prays two rakats” (Sahih al-Bukhari and Sahih Muslim).