Is it permissible to reply to a greeting (salam) with speech while performing prayer (Salah)?
Chapter on the Two Prostrations of Forgetfulness
Al-Mughni
Book of Prayer
Primary text
It is forbidden to reply to a greeting with speech while praying, and doing so invalidates the prayer. This ruling is supported by figures such as Abu Dharr, 'Ata', An-Nakha'i, Malik, Ash-Shafi'i, Ishaq, and Abu Thawr. The evidence for this prohibition is the narration by Jabir that the Prophet (peace be upon him) stated he was not prevented from returning the greeting except because he was praying. Furthermore, the narration of Ibn Mas'ud where the Prophet (peace be upon him) stated, 'Indeed, in the prayer is a preoccupation,' indicates the nature of the distraction. Speech by the worshipper is considered human speech, analogous to responding to a sneezer (tashmeet).
Supporting text
Sa'id ibn al-Musayyab, Al-Hasan, and Qatadah did not see any harm in responding with speech, and a narration attributes the permission for this to Abu Hurayrah. Ishaq stated that if one replies believing it permissible (mu'awwilan), their prayer remains valid.