Hadithcore
Sahih al-Bukhari, 444
sahih

Narrated Abu Qatada Al-Aslami:

Allah's Messenger (ﷺ) said, "If anyone of you enters a mosque, he should pray two rak`at before sitting."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ عَامِرِ بْنِ عَبْدِ اللَّهِ بْنِ الزُّبَيْرِ، عَنْ عَمْرِو بْنِ سُلَيْمٍ الزُّرَقِيِّ، عَنْ أَبِي قَتَادَةَ السَّلَمِيِّ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏

‏ إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ ‏

‏‏.‏

References2 variants
In-Book Reference
Book 8, Hadith 93
USC-MSA web (English) reference
Vol. 1, Book 8, Hadith 435 (deprecated numbering scheme)
Sharh · explanationclick to expand
The prayer to “greet the mosque” (tahiyyat al-masjid) is a Sunnah that was enjoined by the Prophet (blessings and peace of Allah be upon him). In this hadith, the Prophet (blessings and peace of Allah be upon him) instructs the one who comes and enters the mosque at any time – whether that is to pray, to await the prayer, to seek knowledge and so on – to pray two rak‘ahs before he sits down. These are the two rak‘ahs that are done to greet the mosque. This is a general ruling that applies when entering any mosque except al-Masjid al-Haram; in that case the greeting is done by circumambulating the Kaaba seven times. This hadith is specifically addressed to the one who enters the mosque when the call immediately preceding an obligatory prayer (iqamah) has not been given. If the iqamah has been given, then joining the prayer takes precedence over these two rak‘ahs. This hadith indicates that it is encouraged to pray two rak‘ahs to greet the mosque before sitting down..
Related hadiths10
Compare isnād across 10 related chains →