Sahih al-Bukhari
Sahih al-Bukhari 234
Arabic hadith text
حَدَّثَنَا آدَمُ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنَا أَبُو التَّيَّاحِ، يَزِيدُ بْنُ حُمَيْدٍ عَنْ أَنَسٍ، قَالَ كَانَ النَّبِيُّ صلى الله عليه وسلم يُصَلِّي قَبْلَ أَنْ يُبْنَى الْمَسْجِدُ فِي مَرَابِضِ الْغَنَمِ.
Translation
Adam narrated to us, saying: Shubah narrated to us, saying: Abu al-Tayyah—Yazid ibn Humayd—informed us, from Anas, who said: Before the mosque was built, the Prophet (ﷺ) used to pray in sheep pens.