كتاب الزهد والرقائق
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 2980 a

'Abdullah b. Umar reported that Allah's Messenger (ﷺ) said in connection with the people of Hijr (Thamud):

Do not enter but weepingly (the habitations) of these people who had 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.
حَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، وَعَلِيُّ بْنُ حُجْرٍ، جَمِيعًا عَنْ إِسْمَاعِيلَ، قَالَ ابْنُ أَيُّوبَ حَدَّثَنَا إِسْمَاعِيلُ بْنُ جَعْفَرٍ، أَخْبَرَنِي عَبْدُ اللَّهِ بْنُ دِينَارٍ، أَنَّهُ سَمِعَ عَبْدَ اللَّهِ، بْنَ عُمَرَ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم لأَصْحَابِ الْحِجْرِ ‏ "‏ لاَ تَدْخُلُوا عَلَى هَؤُلاَءِ الْقَوْمِ الْمُعَذَّبِينَ إِلاَّ أَنْ تَكُونُوا بَاكِينَ فَإِنْ لَمْ تَكُونُوا بَاكِينَ فَلاَ تَدْخُلُوا عَلَيْهِمْ أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 2980a
In-book reference : Book 55, Hadith 47
USC-MSA web (English) reference : Book 42, Hadith 7103
  (deprecated numbering scheme)