Language:
كتاب الأدب
78
Good Manners and Form (Al-Adab)
(75)
Chapter: What to say when one is angry or harsh for Allah's sake
(75)
بَابُ مَا يَجُوزُ مِنَ الْغَضَبِ وَالشِّدَّةِ لأَمْرِ اللَّهِ
وَقَالَ اللَّهُ: {جَاهِدِ الْكُفَّارَ وَالْمُنَافِقِينَ وَاغْلُظْ عَلَيْهِمْ}.

Narrated Zaid bin Thabit:

Allah's Messenger (ﷺ) made a small room (with a palm leaf mat). Allah's Messenger (ﷺ) came out (of his house) and prayed in it. Some men came and joined him in his prayer. Then again the next night they came for the prayer, but Allah's Messenger (ﷺ) delayed and did not come out to them. So they raised their voices and knocked the door with small stones (to draw his attention). He came out to them in a state of anger, saying, "You are still insisting (on your deed, i.e. Tarawih prayer in the mosque) that I thought that this prayer (Tarawih) might become obligatory on you. So you people, offer this prayer at your homes, for the best prayer of a person is the one which he offers at home, except the compulsory (congregational) prayer."

وَقَالَ الْمَكِّيُّ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ،‏.‏ وَحَدَّثَنِي مُحَمَّدُ بْنُ زِيَادٍ، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ، قَالَ حَدَّثَنِي سَالِمٌ أَبُو النَّضْرِ، مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ عَنْ بُسْرِ بْنِ سَعِيدٍ، عَنْ زَيْدِ بْنِ ثَابِتٍ ـ رضى الله عنه ـ قَالَ احْتَجَرَ رَسُولُ اللَّهِ صلى الله عليه وسلم حُجَيْرَةً مُخَصَّفَةً أَوْ حَصِيرًا، فَخَرَجَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي فِيهَا، فَتَتَبَّعَ إِلَيْهِ رِجَالٌ وَجَاءُوا يُصَلُّونَ بِصَلاَتِهِ، ثُمَّ جَاءُوا لَيْلَةً فَحَضَرُوا وَأَبْطَأَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْهُمْ، فَلَمْ يَخْرُجْ إِلَيْهِمْ فَرَفَعُوا أَصْوَاتَهُمْ وَحَصَبُوا الْبَابَ، فَخَرَجَ إِلَيْهِمْ مُغْضَبًا فَقَالَ لَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَا زَالَ بِكُمْ صَنِيعُكُمْ حَتَّى ظَنَنْتُ أَنَّهُ سَيُكْتَبُ عَلَيْكُمْ، فَعَلَيْكُمْ بِالصَّلاَةِ فِي بُيُوتِكُمْ، فَإِنَّ خَيْرَ صَلاَةِ الْمَرْءِ فِي بَيْتِهِ، إِلاَّ الصَّلاَةَ الْمَكْتُوبَةَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 6113
In-book reference : Book 78, Hadith 140
USC-MSA web (English) reference : Vol. 8, Book 73, Hadith 134
  (deprecated numbering scheme)