I said to Anas, "Did Allah's Messenger (ﷺ) make Medina a sanctuary?" He replied, "Yes…

Sahih al-Bukhari Book 96 Hadith 37

Sahih al-Bukhari #7306

Holding Fast to the Qur'an and Sunnah 96:37

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..."

Chapter: The sin of giving refuge or helping a person innovating an heresy

Grade: Sahih