Sahih al-Bukhari 7306
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، حَدَّثَنَا عَبْدُ الْوَاحِدِ، حَدَّثَنَا عَاصِمٌ، قَالَ قُلْتُ لأَنَسٍ أَحَرَّمَ رَسُولُ اللَّهِ صلى الله عليه وسلم الْمَدِينَةَ. قَالَ نَعَمْ مَا بَيْنَ كَذَا إِلَى كَذَا، لاَ يُقْطَعُ شَجَرُهَا، مَنْ أَحْدَثَ فِيهَا حَدَثًا فَعَلَيْهِ لَعْنَةُ اللَّهِ وَالْمَلاَئِكَةِ وَالنَّاسِ أَجْمَعِينَ. قَالَ عَاصِمٌ فَأَخْبَرَنِي مُوسَى بْنُ أَنَسٍ أَنَّهُ قَالَ أَوْ آوَى مُحْدِثًا.
Narrated `Asim:
I said to Anas, "Did Allah's Messenger (ﷺ) make Medina a sanctuary?" He replied, "Yes, (Medina is a sanctuary from such-and-such place to such-and-such place. It is forbidden to cut its trees, and whoever innovates an heresy in it or commits a sin therein, will incur the curse of Allah, the angels, and all the people." Then Musa bin Anas told me that Anas added, "..... or gives refuge to such an heretic or a sinner..."
Full reference and source
Sahih al-Bukhari 7306 In-book : Book 96, Hadith 37 USC-MSA web (English) : Vol. 9, Book 92, Hadith 409 (deprecated)
View source on Sunnah.com (opens in a new tab)