Sahih Muslim, Book 5, Hadith 14 (Muslim 1167)

Anas reported:

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