Hadithcore
Mishkat al-Masabih, 2732

Abu Sa'id reported the Prophet (ﷺ) as saying, "Abraham declared Mecca sacred and made it a sacred area, and I declare Medina to be sacred throughout the area between its two mountain paths, so that no blood may be shed in it, weapons may not be carried in it for fighting, and leaves may not be beaten off trees in it except for fodder." Muslim transmitted it.

وَعَنْ أَبِي سَعِيدٍ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِنَّ إِبْرَاهِيمَ حَرَّمَ مَكَّةَ فَجَعَلَهَا حَرَامًا وَإِنِّي حَرَّمْتُ الْمَدِينَةَ حَرَامًا مَا بَيْنَ مَأْزِمَيْهَا أَنْ لَا يُهْرَاقَ فِيهَا دَمٌ وَلَا يُحْمَلَ فِيهَا سلاحٌ لقتالٍ وَلَا تُخبَطَ فِيهَا شجرةٌ إِلَّا لعلف» . رَوَاهُ مُسلم

References1 variant
In-Book Reference
Book 10, Hadith 221