Sahih al-Bukhari, Hadith 3381 ⓘ
Narrated Ibn `Umar: Allah's Messenger said, "Do not enter the ruined dwellings of those who were unjust to themselves unless (you enter) weeping, lest you should suffer the same punishment as was inflicted upon them."
حَدَّثَنِي عَبْدُ اللَّهِ، حَدَّثَنَا وَهْبٌ، حَدَّثَنَا أَبِي، سَمِعْتُ يُونُسَ، عَنِ الزُّهْرِيِّ، عَنْ سَالِمٍ، أَنَّ ابْنَ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلاَّ أَنْ تَكُونُوا بَاكِينَ، أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ " .
also referenced under: Book 60, Hadith 25 (In-Book) & Volume 4, Book 55, Hadith 564 (USC-MSA)