Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates: The Noble Prophet (peace and blessings be upon him) went to the mosque in the neighborhood of Banu Amr bin Awf in Quba in order to perform prayer there. Some Ansar came to the Prophet (peace and blessings be upon him) to greet him with salam. (Sayyiduna Abdullah bin Umar, may Allah be pleased with them both, narrates:) I asked Sayyiduna Suhaib (may Allah be pleased with him), because he was with the Prophet (peace and blessings be upon him) at that time, how did the Prophet (peace and blessings be upon him) respond to them? When those people greeted the Prophet (peace and blessings be upon him) with salam while he was praying, Sayyiduna Suhaib (may Allah be pleased with him) informed: The Prophet (peace and blessings be upon him) indicated to them with his hand.
Hadith Referenceمسند الحميدي / 148
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«إسناده صحيح ، وأخرجه ابن حبان فى ”صحيحه“ : برقم: 2258، وأبو يعلى الموصلي فى ”مسنده“ :5638، 5643، وأحمد فى ”مسنده“ ، برقم: 4657 ، برقم: 24516،»
Explanation & Benefits
Shaykh Muhammad Ibrahim bin Basheer
Benefit: It is established from this that if the congregational prayer (jama‘ah) is in progress, someone coming from outside may say "as-salamu alaykum" in a raised voice, and those engaged in prayer may respond with a gesture of the hand while remaining within the prayer. The practice of some people forbidding the saying of "as-salamu alaykum" upon entering the mosque is in clear opposition to the Qur’an and Sunnah. In the valuable book "Ahkam as-Salam" by Shaykh Abdul Wali Haqqani rahimahullah and in "Ahkam wa Adab as-Salamu Alaykum" by Mawlana Abdul Ghafoor Athari billah, this issue has been discussed in detail. May Allah reward them with goodness.
Source: Musnad al-Humaydi: Commentary by Muhammad Ibrahim bin Bashir, Page: 148