Sahih Muslim

Sahih Muslim 524 b

The construction of the Masjid of the Prophet (saws)
Arabic hadith text
حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ الْعَنْبَرِيُّ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، حَدَّثَنِي أَبُو التَّيَّاحِ، عَنْ أَنَسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَيُصَلِّي فِي مَرَابِضِ الْغَنَمِ قَبْلَ أَنْ يُبْنَى الْمَسْجِدُ ‏.‏
Translation
Anas reported

The Messenger of Allah (ﷺ) used to pray in the folds of the sheep and goats before the mosque was built.