It is narrated from Hazrat Bara (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) made peace with the people of Makkah on the condition that they would enter Makkah only carrying sheathed weapons, that is, the scabbard and the sword.
Hadith Referenceمسند احمد / أول مسند الكوفيين / 18580
Hadith Gradingحکم دارالسلام:حديث صحيح، خ: 3184، م: 1783، حجاج بن أرطاة ضعيف، لكنه توبع