كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(7)
Chapter: The prohibition of speaking during the prayer, and the abrogation of its former permissibility
(7)
باب تَحْرِيمِ الْكَلاَمِ فِي الصَّلاَةِ وَنَسْخِ مَا كَانَ مِنْ إِبَاحَتِهِ ‏
Sahih Muslim 537 a

Mu'awiya b. al-Hakam said:

While I was praying with the Messenger of Allah (ﷺ), a man in the company sneezed. I said: Allah have mercy on you! The people stared at me with disapproving looks, so I said: Woe be upon me, why is it that you stare at me? They began to strike their hands on their thighs, and when I saw them urging me to observe silence (I became angry) but I said nothing. When the Messenger of Allah (ﷺ) had said the prayer (and I declare that neither before him nor after him have I seen a leader who gave better instruction than he for whom I would give my father and mother as ransom). I swear that he did not scold, beat or revile me but said: Talking to persons is not fitting during the prayer, for it consists of glorifying Allah, declaring his Greatness. and recitation of the Qur'an or words to that effect. I said: Messenger of Allah. I was till recently a pagan, but Allah has brought Islam to us; among us there are men who have recourse to Kahins. He said, Do not have recourse to them. I said. There are men who take omens. That is something which they find in their breasts, but let it not turn their way (from freedom of action). I said: Among us there are men who draw lines. He said: There was a prophet who drew lines, so if they do it as they did, that is allowable. I had a maid-servant who tended goats by the side of Uhud and Jawwaniya. One day I happened to pass that way and found that a wolf had carried a goat from her flock. I am after all a man from the posterity of Adam. I felt sorry as they (human beings) feel sorry. So I slapped her. I came to the Messenger of Allah (ﷺ) and felt (this act of mine) as something grievous I said: Messenger of Allah, should I not grant her freedom? He (the Holy Prophet) said: Bring her to me. So I brought her to him. He said to her: Where is Allah? She said: He is in the heaven. He said: Who am I? She said: Thou art the Messenger of Allah. He said: Grant her freedom, she is a believing woman.
حَدَّثَنَا أَبُو جَعْفَرٍ، مُحَمَّدُ بْنُ الصَّبَّاحِ وَأَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ - وَتَقَارَبَا فِي لَفْظِ الْحَدِيثِ - قَالاَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ، عَنْ حَجَّاجٍ الصَّوَّافِ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، عَنْ هِلاَلِ بْنِ أَبِي مَيْمُونَةَ، عَنْ عَطَاءِ بْنِ يَسَارٍ، عَنْ مُعَاوِيَةَ بْنِ الْحَكَمِ السُّلَمِيِّ، قَالَ بَيْنَا أَنَا أُصَلِّي، مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم إِذْ عَطَسَ رَجُلٌ مِنَ الْقَوْمِ فَقُلْتُ يَرْحَمُكَ اللَّهُ ‏.‏ فَرَمَانِي الْقَوْمُ بِأَبْصَارِهِمْ فَقُلْتُ وَاثُكْلَ أُمِّيَاهْ مَا شَأْنُكُمْ تَنْظُرُونَ إِلَىَّ ‏.‏ فَجَعَلُوا يَضْرِبُونَ بِأَيْدِيهِمْ عَلَى أَفْخَاذِهِمْ فَلَمَّا رَأَيْتُهُمْ يُصَمِّتُونَنِي لَكِنِّي سَكَتُّ فَلَمَّا صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم فَبِأَبِي هُوَ وَأُمِّي مَا رَأَيْتُ مُعَلِّمًا قَبْلَهُ وَلاَ بَعْدَهُ أَحْسَنَ تَعْلِيمًا مِنْهُ فَوَاللَّهِ مَا كَهَرَنِي وَلاَ ضَرَبَنِي وَلاَ شَتَمَنِي قَالَ ‏"‏ إِنَّ هَذِهِ الصَّلاَةَ لاَ يَصْلُحُ فِيهَا شَىْءٌ مِنْ كَلاَمِ النَّاسِ إِنَّمَا هُوَ التَّسْبِيحُ وَالتَّكْبِيرُ وَقِرَاءَةُ الْقُرْآنِ ‏"‏ ‏.‏ أَوْ كَمَا قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم قُلْتُ يَا رَسُولَ اللَّهِ إِنِّي حَدِيثُ عَهْدٍ بِجَاهِلِيَّةٍ وَقَدْ جَاءَ اللَّهُ بِالإِسْلاَمِ وَإِنَّ مِنَّا رِجَالاً يَأْتُونَ الْكُهَّانَ ‏.‏ قَالَ ‏"‏ فَلاَ تَأْتِهِمْ ‏"‏ ‏.‏ قَالَ وَمِنَّا رِجَالٌ يَتَطَيَّرُونَ ‏.‏ قَالَ ‏"‏ ذَاكَ شَىْءٌ يَجِدُونَهُ فِي صُدُورِهِمْ فَلاَ يَصُدَّنَّهُمْ ‏"‏ ‏.‏ قَالَ ابْنُ الصَّبَّاحِ ‏"‏ فَلاَ يَصُدَّنَّكُمْ ‏"‏ ‏.‏ قَالَ قُلْتُ وَمِنَّا رِجَالٌ يَخُطُّونَ ‏.‏ قَالَ ‏"‏ كَانَ نَبِيٌّ مِنَ الأَنْبِيَاءِ يَخُطُّ فَمَنْ وَافَقَ خَطَّهُ فَذَاكَ ‏"‏ ‏.‏ قَالَ وَكَانَتْ لِي جَارِيَةٌ تَرْعَى غَنَمًا لِي قِبَلَ أُحُدٍ وَالْجَوَّانِيَّةِ فَاطَّلَعْتُ ذَاتَ يَوْمٍ فَإِذَا الذِّيبُ قَدْ ذَهَبَ بِشَاةٍ مِنْ غَنَمِهَا وَأَنَا رَجُلٌ مِنْ بَنِي آدَمَ آسَفُ كَمَا يَأْسَفُونَ لَكِنِّي صَكَكْتُهَا صَكَّةً فَأَتَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم فَعَظَّمَ ذَلِكَ عَلَىَّ قُلْتُ يَا رَسُولَ اللَّهِ أَفَلاَ أُعْتِقُهَا قَالَ ‏"‏ ائْتِنِي بِهَا ‏"‏ ‏.‏ فَأَتَيْتُهُ بِهَا فَقَالَ لَهَا ‏"‏ أَيْنَ اللَّهُ ‏"‏ ‏.‏ قَالَتْ فِي السَّمَاءِ ‏.‏ قَالَ ‏"‏ مَنْ أَنَا ‏"‏ ‏.‏ قَالَتْ أَنْتَ رَسُولُ اللَّهِ ‏.‏ قَالَ ‏"‏ أَعْتِقْهَا فَإِنَّهَا مُؤْمِنَةٌ ‏"‏ ‏.‏
Reference : Sahih Muslim 537a
In-book reference : Book 5, Hadith 39
USC-MSA web (English) reference : Book 4, Hadith 1094
  (deprecated numbering scheme)