Sunan Ibn Majah #768 · The Book On The Mosques And The Congregations

Sunan Ibn MajahIt was narrated that Abu Hurairah said
Sunan Ibn Majah · Book 4 · The Book On The Mosques And The Congregations
Sunan Ibn Majah · كتاب 4 · كتاب المساجد والجماعات
The Messenger of Allah said: "If you cannot find anywhere (for prayer) except sheep's resting-places and camels' resting-places, then perform prayer in the sheep's resting-places and do not perform prayer in the camels' resting-places
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ، ح وَحَدَّثَنَا أَبُو بِشْرٍ، بَكْرُ بْنُ خَلَفٍ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، قَالاَ حَدَّثَنَا هِشَامُ بْنُ حَسَّانَ، عَنْ مُحَمَّدِ بْنِ سِيرِينَ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏
"‏ إِنْ لَمْ تَجِدُوا إِلاَّ مَرَابِضَ الْغَنَمِ وَأَعْطَانَ الإِبِلِ فَصَلُّوا فِي مَرَابِضِ الْغَنَمِ وَلاَ تُصَلُّوا فِي أَعْطَانِ الإِبِلِ ‏"‏ ‏.‏
Reference : Sunan Ibn Majah 768In-book reference : Book 4, Hadith 34