Sahih Muslim , Book 55, Hadith 49 (In-Book)

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.

حَدَّثَنِي الْحَكَمُ بْنُ مُوسَى أَبُو صَالِحٍ، حَدَّثَنَا شُعَيْبُ بْنُ إِسْحَاقَ، أَخْبَرَنَا عُبَيْدُ اللَّهِ، عَنْ نَافِعٍ، أَنَّ عَبْدَ اللَّهِ بْنَ عُمَرَ، أَخْبَرَهُ أَنَّ النَّاسَ نَزَلُوا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَلَى الْحِجْرِ أَرْضِ ثَمُودَ فَاسْتَقَوْا مِنْ آبَارِهَا وَعَجَنُوا بِهِ الْعَجِينَ فَأَمَرَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم أَنْ يُهَرِيقُوا مَا اسْتَقَوْا وَيَعْلِفُوا الإِبِلَ الْعَجِينَ وَأَمَرَهُمْ أَنْ يَسْتَقُوا مِنَ الْبِئْرِ الَّتِي كَانَتْ تَرِدُهَا النَّاقَةُ ‏.‏

sunnah.com