Rabee’ bin Sabeeh Basri said: I saw Imam Hasan Basri (may Allah have mercy on him) praying two rak‘ahs during the sermon, and he said: The Messenger of Allah (peace and blessings be upon him) said: “When the Imam is delivering the sermon and one of you enters the mosque, let him pray two light rak‘ahs (Tahiyyat al-Masjid), and let him keep them brief.” Imam Darimi (may Allah have mercy on him) said: This is also my opinion.
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1592
Hadith Takhrijاس حدیث کی تخریج اوپر گذر چکی ہے۔ نیز دیکھئے: [أبويعلی 2276] ، اور اس روایت کی سند صحیح ہے۔
Brief Explanation
(Commentary on Hadiths 1589 to 1592) From the aforementioned authentic hadiths, it becomes clear that if a person enters the mosque on Friday while the khateeb is delivering the sermon, even then he should definitely perform two light units (rak‘ahs) of the greeting of the mosque (tahiyyat al-masjid). The Messenger of Allah (sallallahu alayhi wa sallam) instructed a person named Sulaik, who arrived during the sermon, to perform two units (rak‘ahs) even while the sermon was in progress. Shah Waliullah Muhaddith Dehlawi rahimahullah has written in [حجة الله البالغه 101/2] (translation): When a worshipper enters the mosque in such a state that the imam is delivering the sermon, he should perform two light, brief units (rak‘ahs), so that both the regular sunnah (sunnat ratibah) and the sermon are observed. And do not be deceived by the commotion made by the people of your country regarding this issue, because in this matter there is an authentic hadith, the following of which is obligatory. And with Allah is success.