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.
quran:27:91

˹Say, O Muhammad˺, "I have only been commanded to worship the Lord of this city, who made it sacred and to whom ˹belongs˺ all things. And I am commanded to be of the Muslims ˹those who submit to Allah˺  

Say to them: I have been commanded only to worship the Lord of this land, namely, Mecca, which He has made inviolable, which He has made a secure Sanctuary, one in which no human blood may be shed, no person may be wronged, none of its prey may be hunted and ˹a sanctuary˺ which is never deserted. Such were the graces bestowed ˹by God˺ upon its inhabitants, the ˹tribe of˺ Quraysh, ˹graces˺ whereby God has spared their land the suffering and civil strife common to all the ˹other˺ lands of the Arabs; and to Whom, exalted be He, all things belong, for He is their Lord, Creator and Possessor. And I have been commanded to be of those who submit, to God, by affirming His Oneness;
القرآن:٢٧:٩١

إِنَّمَا أُمِرْتُ أَنْ أَعْبُدَ رَبَّ هَٰذِهِ الْبَلْدَةِ الَّذِي حَرَّمَهَا وَلَهُ كُلُّ شَيْءٍ ۖ وَأُمِرْتُ أَنْ أَكُونَ مِنَ الْمُسْلِمِينَ  

{إنما أمرت أن أعبد رب هذه البلدة} أي مكة {الذي حرمها} جعلها حرماً آمناً لا يسفك فيها دم إنسان ولا يظلم فيها أحد ولا يصاد صيدها ولا يختلى خلاها، وذلك من النعم على قريش أهلها في رفع الله عن بلدهم العذاب والفتن الشائعة في جميع بلاد العرب {وله} تعالى {كل شيء} فهو ربه وخالقه ومالكه {وأمرت أن أكون من المسلمين} لله بتوحيده.