Mosques and places of Prayer - Section 1 Mishkat al-Masabih 704
Arabic hadith text
وَعَنْ أَبِي قَتَادَةَ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يجلس»
Translation
Abu Qatada reported God’s Messenger as saying, “When one of you enters the mosque he should pray two rak'as before sitting down.” (Bukhari and Muslim.)