Hadith 13018

(حديث مرفوع) حَدَّثَنَا حَجَّاجٌ ، قَالَ : سَمِعْتُ شُعْبَةَ يُحَدِّثُ ، عَنْ أَبِي التَّيَّاحِ ، قَالَ : سَمِعْتُ أَنَسَ بْنَ مَالِكٍ قَالَ : كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ " قَبْلَ أَنْ يَبْنِيَ الْمَسْجِدَ يُصَلِّي فِي مَرَابِضِ الْغَنَمِ " .
It is narrated from Hazrat Anas (may Allah be pleased with him) that before the construction of the Prophet’s Mosque, the Prophet (peace and blessings be upon him) used to offer prayers in a goat enclosure as well.
Hadith Reference مسند احمد / مسند المكثرين من الصحابة / 13018
Hadith Grading حکم دارالسلام: إسناده صحيح، خ: 234، م: 524