Hadith 5125

وَعَنِ ابْنِ عُمَرَ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لَمَّا مَرَّ بِالْحِجْرِ قَالَ: «لَا تَدْخُلُوا مَسَاكِنَ الَّذِينَ ظَلَمُوا أَنْفُسَهُمْ إِلَّا أَنْ تَكُونُوا بَاكِينَ أَنْ يُصِيبَكُمْ مَا أَصَابَهُمْ» ثُمَّ قَنَّعَ رَأْسَهُ وَأَسْرَعَ السَّيْرَ حَتَّى اجتاز الْوَادي. مُتَّفق عَلَيْهِ
It is narrated from Ibn Umar, may Allah be pleased with him, that when the Prophet, peace and blessings be upon him, passed by the place of Hijr, he said: "Enter the dwellings of those who wronged themselves weeping, lest you be afflicted with the same punishment that befell them." Then the Prophet, peace and blessings be upon him, covered his head and hastened his pace until he had passed through the valley. Agreed upon.
Hadith Reference مشكوة المصابيح / كتاب الآداب / 5125
Hadith Grading الألبانی: مُتَّفَقٌ عَلَيْهِ  |  زبیر علی زئی: متفق عليه
Hadith Takhrij ´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «متفق عليه، رواه البخاري (4419) و مسلم (39/ 2980)»