Hadithcore
Sahih Muslim, 1356
sahih

Jabir (Allah be pleased with him) reported:

I heard Allah's Messenger (ﷺ) say: It is not permissible for any one of you to carry weapons in Mecca.

حَدَّثَنِي سَلَمَةُ بْنُ شَبِيبٍ، حَدَّثَنَا ابْنُ أَعْيَنَ، حَدَّثَنَا مَعْقِلٌ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرٍ، قَالَ سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏

‏ لاَ يَحِلُّ لأَحَدِكُمْ أَنْ يَحْمِلَ بِمَكَّةَ السِّلاَحَ‏

‏ ‏.‏

References2 variants
In-Book Reference
Book 15, Hadith 511
USC-MSA web (English) reference
Book 7, Hadith 3144 (deprecated numbering scheme)
Sharh · explanationclick to expand
Makkah is a sacred city as it has the Sacred House and sacred sites. The Shariah has legislated for its special rulings that affirm such meanings. It has legislated therein means of security that have not been legislated in any other spot on earth. In this Hadīth, the Prophet (may Allah's peace and blessings be upon him) forbade carrying weapons in Makkah. Perhaps the reason behind this is to prevent it from being a cause of terrifying a Muslim or doing harm to anyone. Undoubtedly, this enhances the sense of security in a place like Makkah where the Islamic sacred sites are found. The prohibition here is meant when there is no necessity for carrying a weapon. However, if there is a necessity - like fighting the disbelievers and their likes - it is permissible to carry weapons like what happened in the Year of the Conquest when the Messenger of Allah (may Allah's peace and blessings be upon him) entered Makkah with his armies carrying their weapons. Allah granted him permission to do so to spread His religion and make His word superior. Hence, Allah made this Sanctuary lawful for him for part of the day, from sunrise to ‘Asr prayer. Then, he declared among people that its sanctity had returned to its former state..