Sayyiduna Sabrah (may Allah be pleased with him) says that the Prophet (peace and blessings be upon him) said to his Companions when halting at al-Hijr: "Whoever has kneaded anything with the water of this well - meaning their well - let him throw it away." So the one with the dough threw away his dough, and the one who had made hays threw away his hays.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6521