Hadithcore
Riyad as-Salihin, 1144

Abu Qatadah (May Allah be pleased with him)reported:

The Messenger of Allah (ﷺ) said, "When anyone of you enters the mosque, he should perform two Rak'ah (of voluntary prayer) before sitting." <b>[Al-Bukhari and Muslim]</b>.

وعن أبي قتادة رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم‏:‏ ‏

‏ إذا دخل أحدكم المسجد فلا يجلس حتى يصلي ركعتين‏

‏‏.‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 8, Hadith 154
Sharh · explanationclick to expand
<b>Guidance from the Hadiths:</b><br> 1) The greeting of the mosque is a strongly confirmed Sunnah. It is to be prayed whenever a person enters the mosque and intends to sit down.<br> 2) The purpose of the greeting of the mosque is to begin your stay in the mosque with a prayer, be it a Rawātib Sunnah, a Sunnah of ablution, or an obligatory prayer performed in congregation.<br> 3) By legislating the greeting of the mosque, the Shariah shows reverence to the houses of Allah and their sacredness.
Related hadiths9
Compare isnād across 9 related chains →