Sahih Muslim | Book 42 | Chapter 2

Narrated by 'Abdullah b. Umar
'Abdullah b. Umar reported that Allah's Messenger (may peace be upon him) said in connection with the people of Hijr (Thamud): Do not enter but weepingly (the habitations) of these people who bad been punished by (Allah), and in case you do not feel inclined to weep, then do not enter (these habitations) that you may not meet the same calamity as had fallen to their lot.

Narrated by Ibn Shihab
Ibn Shihab reported, and he had been talking about the stony abodes of Thamud, and he said: Salim b. 'Abdullah reported that 'Abdullah b. Umar said: We were passing along with Allah's Messenger (may peace be upon him) through the habitations of Hijr, and Allah's Messenger (may peace be upon him) said: Do not enter but weepingly the habitations of these persons who committed tyranny among themselves, lest the same calamity should fall upon you as it fell upon them. He then urged his mount to proceed quickly and pass through that valley hurriedly.

Narrated by Abdullah b. 'Umar
Abdullah b. 'Umar reported that the people encamped along with Allah's Messenger (may peace be upon him) 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 (may peace be upon him) 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.

Narrated by 'Abdullah
This hadith has been narrated on the authority of 'Abdullah with the same chain of transmitters but with a slight variation of wording.