Anas bin Malik reported,

The Prophet ﷺ used to pray in the resting places of sheep. Then I later heard him say that he used to pray in the resting places of sheep before the mosque was built.

Bukhari 429

Sahih

حدثنا سليمان بن حرب قال حدثنا شعبة عن أبي التياح

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

كان النبي ﷺ يصلي في مرابض الغنم ثم سمعته بعد يقول كان يصلي في مرابض الغنم قبل أن يبنى المسجد

البخاري 429صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Prayer
Chapter
Prayer in sheep pens
Numbering
Darussalam 429
Bukhari 429