What is the ruling on speech during prayer made by someone ignorant of the prohibition?
Chapter on the Two Prostrations of Forgetfulness
Al-Mughni
Book of Prayer
Primary text
The prayer is likely not invalidated if a person speaks while ignorant of the prohibition against speech in prayer. This is because speech was permissible in prayer prior to the abrogation, as evidenced by the Hadith of Ibn Mas'ud and Zayd ibn Arqam. The ruling of abrogation is not established against someone who was unaware of it, similar to the people of Quba' concerning the change of the Qibla before they knew. This contrasts with the one who forgets, where the ruling has already been established against them, and with eating while fasting while ignorant of the prohibition, as eating was never permissible during the fast. Evidence supporting the validity of the prayer of the ignorant speaker is the Hadith of Ma'awiyah ibn al-Hakam as-Sulami, who spoke after sneezing and was corrected by the Prophet without being commanded to repeat the prayer.
Supporting text
This situation should be governed by the same principles applicable to speech due to forgetfulness, as the speaker is excused due to ignorance, similar to forgetfulness. This ruling is the view of Ash-Shafi'i.