Sahih Muslim – Hadith No : 1202

Anas reported: The Messenger of Allah (may peace be upon him) used to pray in the folds of the sheep and goats before the mosque was built.

Hadith In Arabic Text :

حدثنا عبيد الله بن معاذ العنبري، حدثنا أبي، حدثنا شعبة، حدثني أبو التياح، عن أنس، أن رسول الله صلى الله عليه وسلم كان يصلي في مرابض الغنم قبل أن يبنى المسجد ‏.‏

Chapter : The Book of Mosques and Places of Prayer – كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ