Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:9838Abū Ṭāhir al-Faqīh > Abū Bakr Muḥammad b. ʿUmar b. Ḥafṣ al-Zāhid > Muḥammad b. Yūnus > Saʿīd b. Aws Abū Zayd al-Anṣārī > Shuʿbah > al-Ḥakam > Ibrāhīm > ʿAlqamah > ʿAbdullāh b. Masʿūd

[Machine] From one of the prophets and not from empty nations, it is known that no one has ever come to the Kaaba without it being sacred, and the Messenger of Allah ﷺ never entered Mecca except in the state of sanctity, except during the conquest war.  

البيهقي:٩٨٣٨أَخْبَرَنَا أَبُو طَاهِرٍ الْفَقِيهُ ثنا أَبُو بَكْرٍ مُحَمَّدُ بْنُ عُمَرَ بْنِ حَفْصٍ الزَّاهِدُ ثنا مُحَمَّدُ بْنُ يُونُسَ ثنا سَعِيدُ بْنُ أَوْسٍ أَبُو زَيْدٍ الْأَنْصَارِيُّ ثنا شُعْبَةُ عَنِ الْحَكَمِ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ عَنْ عَبْدِ اللهِ بْنِ مَسْعُودٍ قَالَ حَجَّ مُوسَى بْنُ عِمْرَانَ عَلَيْهِ السَّلَامُ فِي خَمْسِينَ أَلْفًا مِنْ بَنِي إِسْرَائِيلَ وَعَلَيْهِ عَبَاءَتَانِ قَطَوَانِيَّتَانِ وَهُوَ يُلَبِّي لَبَّيْكَ اللهُمَّ لَبَّيْكَ لَبَّيْكَ تَعَبُّدًا وَرِقًّا لَبَّيْكَ أَنَا عَبْدُكَ أَنَا لَدَيْكَ لَدَيْكَ يَا كَشَّافَ الْكُرَبِ قَالَ فَجَاوَبَتْهُ الْجِبَالُ قَالَ الشَّافِعِيُّ رَحِمَهُ اللهُ وَلَمْ يُحْكَ لَنَا

عَنْ أَحَدٍ مِنَ النَّبِيِّينَ وَلَا الْأُمَمِ الْخَالِينَ أَنَّهُ جَاءَ الْبَيْتَ أَحَدٌ قَطُّ إِلَّا حَرَامًا وَلَمْ يَدْخُلْ رَسُولُ اللهِ ﷺ مَكَّةَ عَلِمْنَاهُ إِلَّا حَرَامًا إِلَّا فِي حَرْبِ الْفَتْحِ