كتاب الزهد والرقائق
55  
The Book of Zuhd and Softening of Hearts
(1)
Chapter: The Prohibition Of Entering Upon The People Of Al-Hijr (The Rocky Tract) Unless One Enters Weeping
(1)
باب لاَ تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلاَّ أَنْ تَكُونُوا بَاكِينَ ‏.‏
Sahih Muslim 2981 a

Abdullah b. 'Umar reported that the people encamped along with Allah's Messenger (ﷺ) in the valley of Hijr, the habitations of Thamud, and they quenched their thirst from the wells thereof and kneaded the flour with it. Thereupon Allah's Messenger (ﷺ) commanded that the water collected for drinking should be spilt and the flour should be given to the camels and commanded them that the water for drinking should be taken from that well where the she-camel (of Hadrat Salih) used to come.

حَدَّثَنِي الْحَكَمُ بْنُ مُوسَى أَبُو صَالِحٍ، حَدَّثَنَا شُعَيْبُ بْنُ إِسْحَاقَ، أَخْبَرَنَا عُبَيْدُ اللَّهِ، عَنْ نَافِعٍ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، أَخْبَرَهُ أَنَّ النَّاسَ نَزَلُوا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَلَى الْحِجْرِ أَرْضِ ثَمُودَ فَاسْتَقَوْا مِنْ آبَارِهَا وَعَجَنُوا بِهِ الْعَجِينَ فَأَمَرَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم أَنْ يُهَرِيقُوا مَا اسْتَقَوْا وَيَعْلِفُوا الإِبِلَ الْعَجِينَ وَأَمَرَهُمْ أَنْ يَسْتَقُوا مِنَ الْبِئْرِ الَّتِي كَانَتْ تَرِدُهَا النَّاقَةُ ‏.‏
Reference : Sahih Muslim 2981a
In-book reference : Book 55, Hadith 49
USC-MSA web (English) reference : Book 42, Hadith 7105
  (deprecated numbering scheme)