Hadithcore
Sahih al-Bukhari, 234
sahih

Narrated Anas:

Prior to the construction of the mosque, the Prophet (ﷺ) offered the prayers at sheep-folds.

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

References2 variants
In-Book Reference
Book 4, Hadith 100
USC-MSA web (English) reference
Vol. 1, Book 4, Hadith 235 (deprecated numbering scheme)
Related hadiths3
Compare isnād across 3 related chains →