Hadithcore
Sahih al-Bukhari, 440
sahih

Narrated Nafi`:

`Abdullah bin `Umar said: I used to sleep in the mosque of the Prophet (ﷺ) while I was young and unmarried.

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

References2 variants
In-Book Reference
Book 8, Hadith 89
USC-MSA web (English) reference
Vol. 1, Book 8, Hadith 431 (deprecated numbering scheme)
Sharh · explanationclick to expand
The mosque is regarded as a sacred place and is held in high esteem by the Muslims. The Prophet (blessings and peace of Allah be upon him) taught us what is and is not permissible in the mosque. In this hadith, Nafi‘, the freed slave of Ibn ‘Umar, tells us that ‘Abdullah ibn ‘Umar (may Allah be pleased with him) told him that when he was a young, unmarried man who had no wife – and even though the fact that he had no wife is understood from the word unmarried, it is added here for emphasis – he used to sleep in the Mosque of the Prophet (blessings and peace of Allah be upon him). It was said that he used to spend the night there because he did not have a house of his own, or it may be that he used to spend the night in the mosque so that he could be near to the Prophet (blessings and peace of Allah be upon him) and learn from him, and so that he could pray in the mosque whenever he wanted to. It is proven that the ‘Uranis [people from the tribe of ‘Uraynah] used to sleep in the mosque. It is proven in al-Sahihayn that ‘Ali (may Allah be pleased with him) slept in the mosque, as did Safwan ibn Umayyah, and the woman who had been accused of stealing a scarf also slept in the mosque; and it is proven that numerous others among the Sahabah also did that. It was narrated that Thumamah ibn Uthal used to sleep in the mosque before he became Muslim. All of that happened at the time of the Messenger of Allah (blessings and peace of Allah be upon him), which indicates that it is permissible to spend the night and to sleep in the mosque, especially for the poor and those who have no home. This is a call to mosques to be refuges for the poor, especially now, as they are sturdily constructed and are suitable to offer such refuge..
Related hadiths3
Compare isnād across 3 related chains →