Anas bin Malik reported,

The Prophet ﷺ used to pray in the sheep pens before the mosque was built.

Azami 2621

Sahih

عن أنس بن مالك قال

كان النبي ﷺ يصلي قبل أن يبنى المسجد في مرابض الغنم.

الأعظمي 2621صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
What is prohibited and disliked in prayer
Section
Disliking prayer in camel resting places and its permissibility in sheep pens
Numbering
Jami al-Kamil 2621 (2nd edition)
Azami 2621