Abdullah bin Umar reported,

During the year of Tabuk, the Messenger of Allah ﷺ camped with the people at al-Hijr, near the dwellings of Thamud. The people drew water from the wells that Thamud used to drink from, and they kneaded dough with it and set up cooking pots filled with meat.The Messenger of Allah ﷺ ordered them to pour out the contents of the pots and to feed the dough to the camels. Then he moved on with them until he camped at the well from which the she-camel used to drink, and he forbade them from entering the dwellings of the people who had been punished.He said, "I fear that what afflicted them may afflict you, so do not enter their dwellings."

Ahmad 5984

Sahih

حدثنا عبد الصمد حدثنا صخر يعني ابن جويرية عن نافع

عن ابن عمر قال

نزل رسول الله ﷺ بالناس عام تبوك نزل بهم الحجر عند بيوت ثمود فاستسقى الناس من الآبار التي كان يشرب منها ثمود فعجنوا منها ونصبوا القدور باللحم فأمرهم رسول الله ﷺ فأهراقوا القدور وعلفوا العجين الإبل ثم ارتحل بهم حتى نزل بهم على البئر التي كانت تشرب منها الناقة ونهاهم أن يدخلوا على القوم الذين عذبوا قال إني أخشى أن يصيبكم مثل ما أصابهم فلا تدخلوا عليهم

أحمد 5984صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Umar
Numbering
Darussalam 5984
Ahmad 5984