Hadithcore
Sahih al-Bukhari, 731
sahih

Narrated Zaid bin Thabit:

Allah's Messenger (ﷺ) made a small room in the month of Ramadan (Sa`id said, "I think that Zaid bin Thabit said that it was made of a mat") and he prayed there for a few nights, and so some of his companions prayed behind him. When he came to know about it, he kept on sitting. In the morning, he went out to them and said, "I have seen and understood what you did. You should pray in your houses, for the best prayer of a person is that which he prays in his house except the compulsory prayers."

حَدَّثَنَا عَبْدُ الأَعْلَى بْنُ حَمَّادٍ، قَالَ حَدَّثَنَا وُهَيْبٌ، قَالَ حَدَّثَنَا مُوسَى بْنُ عُقْبَةَ، عَنْ سَالِمٍ أَبِي النَّضْرِ، عَنْ بُسْرِ بْنِ سَعِيدٍ، عَنْ زَيْدِ بْنِ ثَابِتٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم اتَّخَذَ حُجْرَةً ـ قَالَ حَسِبْتُ أَنَّهُ قَالَ ـ مِنْ حَصِيرٍ فِي رَمَضَانَ فَصَلَّى فِيهَا لَيَالِيَ، فَصَلَّى بِصَلاَتِهِ نَاسٌ مِنْ أَصْحَابِهِ، فَلَمَّا عَلِمَ بِهِمْ جَعَلَ يَقْعُدُ، فَخَرَجَ إِلَيْهِمْ فَقَالَ ‏

‏ قَدْ عَرَفْتُ الَّذِي رَأَيْتُ مِنْ صَنِيعِكُمْ، فَصَلُّوا أَيُّهَا النَّاسُ فِي بُيُوتِكُمْ، فَإِنَّ أَفْضَلَ الصَّلاَةِ صَلاَةُ الْمَرْءِ فِي بَيْتِهِ إِلاَّ الْمَكْتُوبَةَ ‏

‏‏.‏ قَالَ عَفَّانُ حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا مُوسَى، سَمِعْتُ أَبَا النَّضْرِ، عَنْ بُسْرٍ، عَنْ زَيْدٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم‏.‏

References2 variants
In-Book Reference
Book 10, Hadith 125
USC-MSA web (English) reference
Vol. 1, Book 11, Hadith 698 (deprecated numbering scheme)
Sharh · explanationclick to expand
The Sahabah (may Allah be pleased with them) were highly motivated in doing acts of worship and hastening to do good. As a result of their high motivation, they were extremely keen to be close to the Messenger of Allah (blessings and peace of Allah be upon him) and to do acts of worship, whether obligatory or supererogatory, as he did them. The Messenger of Allah (blessings and peace of Allah be upon him) encouraged them to do that and would direct them to that which is best. In this hadith, Zayd ibn Thabit (may Allah be pleased with him) narrates that the Prophet (blessings and peace of Allah be upon him) set up a small enclosure in his mosque, as a barrier to conceal him from the people; this small enclosure was made from a reed mat (hujrah) that surrounded and marked that spot. The word hujrah (translated here as small enclosure) does not refer to the apartment (hujrah) of ‘A’ishah or the apartments of his other wives (may Allah be pleased with them), in which he and his family lived. The apartments of the wives of the Prophet (blessings and peace of Allah be upon him) had walls that served as screens, so that whoever was outside could not see anyone who was inside. Rather what is meant is that during Ramadan, the Prophet (blessings and peace of Allah be upon him) marked off a spot that was enclosed with a reed mat, to conceal him, making the mat like a small enclosure (hujrah) in which he could offer the voluntary prayers without anyone passing directly in front of him, so that he would be able to focus with humility and without distractions. This is something that is prescribed and permissible, if it will not inconvenience other worshippers and the like. The Prophet (blessings and peace of Allah be upon him) prayed qiyam al-layl in this small enclosure during Ramadan; this is what later came to be known as Tarawih prayer. The people began to gather and follow his prayer, emulating him. When he saw them doing that, he stopped doing it and did not come out to them; he stopped praying qiyam in the mosque in this small enclosure. Then he said: I realize how keen you are to pray qiyam with me. According to a report narrated from ‘A’ishah (may Allah be pleased with her) by al-Bukhari, he (blessings and peace of Allah be upon him) explained to them that the reason why he had stopped praying qiyam, even though he was aware of how keen they were to do it, was the fact that he feared that this prayer would be made obligatory for them. Then he said, “O people, pray at home, for the best of prayer is a prayer that a man offers in his house, except for the obligatory prayer.” This clearly indicates that the best with regard to supererogatory prayers is to pray them at home. This is general in meaning and applies to all supererogatory and Sunnah prayers, except those supererogatory prayers which are symbols of Islam, such as the Eid prayer, eclipse prayer, and prayer for rain (istisqa’), as well as those which are connected to the mosque, such as the two rak‘ahs to greet the mosque (tahiyyat al-masjid). If someone were to say that the Messenger of Allah (blessings and peace of Allah be upon him) offered supererogatory prayers in the mosque, which would imply that he was not doing that which is more appropriate, the response to this is that he (blessings and peace of Allah be upon him) offered those prayers in the mosque in order to teach people and to show that it is permissible to pray supererogatory prayers in the mosque. If the Prophet (blessings and peace of Allah be upon him) did something in order to teach the people, this was better in his case, even though in the case of others it is not the most appropriate option. The Prophet (blessings and peace of Allah be upon him) urged the people to offer supererogatory prayers at home, because this is easier and further removed from showing off, and because it is a means of bringing blessing (barakah) to the house so that mercy will descend upon the house and the Shaytan will be scared away. This hadith indicates that it is permissible to follow in prayer someone who did not intend to act as an imam and lead that prayer. It indicates that it is permissible to offer supererogatory prayer in congregation. It indicates that supererogatory prayer offered at home is better than that which is offered in the mosque. It also highlights the compassion that the Prophet (blessings and peace of Allah be upon him) showed to his ummah..
Related hadiths4
Compare isnād across 4 related chains →